Table of Contents
Praktisches für die mongodb
Lustiges über Locks
Cursor
Falls man keine Lust auf Time-Outs bei Cursor-Objekten hat, in Python können Sie mittels timeout=False bei find() deaktiviert werden. Nebeneffekte gilt es noch zu untersuchen, aber ohne den Schalter funktionieren Hintergrund-Tasks auf großen Datenmengen nicht richtig.
Zum Thema Monitoring/Performance
http://docs.mongodb.org/manual/administration/monitoring/
http://docs.mongodb.org/manual/administration/optimization/
Im- und Export (Backup)
mongoexport –db picalike –username picalike –password <…> –collection ic_334 –out /mnt/images/collection_backups/ic_334_now.json
mongoimport –db picalike –username picalike –password <…> –collection ic_363 –file /mnt/images/collection_backups/ic_334_now.json
Backup einspielen - HowTo
<HTML><ol></HTML>
- Alte Collection in der mongodb löschen oder umbenennen
- Auf mongodb01 im Verzeichnis /mnt/images/collection_backups/ die gewünschte Sicherung entpacken
- Importieren (siehe oben)
- Auf index01 mittels dem Script mongo2monetSimTable.php <uid> das Backup in die monetdb übertragen<HTML></ol></HTML>
Template für neuen V3 user
{ “active” : true, “company” : “bonprix”, “contact” : { “firstname” : “”, “lastname” : “”, “street” : “”, “housenr” : “”, “zip” : “”, “city” : “”, “country” : “”, “email” : “” }, “name” : “bonprix”, “nickname” : “bonprix”, “password” : “”, “products” : { “simApi” : true, “recommendor” : true, “imageUpload” : false, “colorExport” : false, “customizedUpdateRequest” : false }, “settings” : { “csv” : { “feedUrl” : “http://www.dingenskirchen.de/csv”, “delimiter” : “;”, “multiCatDelimiter” : “|”, “useFirstLine” : false, “fieldNames” : { “imgId” : 0, “category” : 1, “imgUrl” : 5, “brand” : 4, “price” : 2, “deeplink” : 3, “available” : 6 } }, “enrichment” : { “colorExport” : true, “maxParallelThreads” : 12, “allowedColorDist” : 1000.1, “colorModel” : “color_weare” }, “ftp_mdtm” : “213 20140827114826”, “imgCollection” : “ic_904”, “updateTime” : { “hour” : 5, “minute” : 45 } }, “uid” : 904, “update” : false, “url” : “” }
Template für neuen user
{ “active” : true, “company” : “Die Firma”, “contact” : { “firstname” : “John”, “lastname” : “Grisham”, “street” : “Arkansas Street”, “housenr” : “73”, “zip” : “31415”, “city” : “Jonesboro”, “country” : “DEU”, “email” : “john.grisham@dieAkte.de” }, “name” : “Firma live”, “nickname” : “firma live”, “password” : “md5 von was ganz geheimen”, “products” : { “simApi” : true, “recommendor” : true, “imageUpload” : false, “colorExport” : false }, “settings” : { “csv” : { “feedUrl” : “http://feed.wo.auchimmer”, “delimiter” : “|”, “useFirstLine” : false, “multiCatDelimiter” : “$”, “fieldNames” : { “imgId” : 0, “category” : 3, “imgUrl” : 2, “deeplink” : 6, “price” : 4, “brand” : 7, “color” : 9, “size” : 8 } }, “enrichment” : { “maxParallelThreads” : 10, “colorExport” : false, “allowedColorDist” : 1000.1, “colorModel” : “color_weare”, “bowVocab_A” : “/home/picalike/pvt3/settings/picalike/freak/freakDescriptors.csv”, “bowVocab_B” : “/home/picalike/pvt3/settings/picalike/wavelet/coeffDescriptors.csv”, “skinColorMLP” : “/home/picalike/pvt3/settings/picalike/skinColor/skinColorMlp.dat”, “faceCascade_1” : “/home/picalike/pvt3/settings/picalike/personenFinden/haarcascade_frontalface_alt2.xml”, “faceCascade_2” : “/home/picalike/pvt3/settings/picalike/personenFinden/haarcascade_profileface.xml” }, “imgCollection” : “ic_<uid>”, “imgCrawler” : { “maxParallelDownloads” : 10 }, “logCollection” : “log_<uid>”, “monetdb” : { “deleteOldTable” : true, “multiCatTableName” : “multicat_<uid>”, “simTableName” : “sim_<uid>” }, “updateTime” : { “hour” : 11, “minute” : 15 } }, “uid” : <uid>, “update” : false, “url” : “http://tolle.homepage.hoho” }