cubicle 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Cubicle
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -6811,3 +6811,1154 @@ DefectCubicle processed @ Sat Mar 13 22:11:42 -0800 2010in 0.057223 seconds.
6811
6811
  MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
6812
6812
  MONGODB cubicle_test.system.namespaces.find({}, {})
6813
6813
  MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
6814
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6815
+ MONGODB db.#<class:0x3d840b0>s.update({:_id=>4b9ca299ff84062358000001}, {"_id"=>4b9ca299ff84062358000001, "a_string"=>"hi", "a_float"=>1.0})
6816
+ MONGODB db.#<class:0x3d840b0>s.update({:_id=>4b9ca299ff84062358000002}, {"_id"=>4b9ca299ff84062358000002, "a_string"=>"hi", "a_float"=>2.5})
6817
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6818
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"#<class:0x3d840b0>s", "map"=>" function(){emit({a_string:this.a_string},{a_float:this.a_float});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n \n \n return value;\n }\n", "query"=>{}}, {}).limit(-1)
6819
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556441_77", "query"=>{}, "fields"=>nil}, {}).limit(-1)
6820
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556441_77.find({}, {})
6821
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6822
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556441_77"}, {}).limit(-1)
6823
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6824
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6825
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6826
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6827
+ MONGODB cubicle_test.$cmd.find({:drop=>"#<class:0x3d840b0>s"}, {}).limit(-1)
6828
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6829
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca299ff84062358000003, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
6830
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca299ff84062358000004, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
6831
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca299ff84062358000005, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
6832
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca299ff84062358000006, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
6833
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca299ff84062358000007, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
6834
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6835
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({product:this.product.name},{total:((this.defect_id) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n \n \n return value;\n }\n", "query"=>{}}, {}).limit(-1)
6836
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556441_78", "query"=>{}, "fields"=>nil}, {}).limit(-1)
6837
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556441_78.find({}, {})
6838
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6839
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556441_78"}, {}).limit(-1)
6840
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6841
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6842
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6843
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6844
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
6845
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6846
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6847
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6848
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6849
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6850
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6851
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6852
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6853
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6854
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6855
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6856
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6857
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6858
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6859
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6860
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6861
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6862
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6863
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6864
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6865
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6866
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6867
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6868
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6869
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6870
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6871
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6872
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6873
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6874
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6875
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6876
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6877
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6878
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6879
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6880
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6881
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6882
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6883
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6884
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6885
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6886
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6887
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6888
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6889
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6890
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6891
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6892
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6893
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6894
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6895
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6896
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6897
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6898
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29aff84062358000008, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
6899
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29aff84062358000009, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
6900
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29aff8406235800000a, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
6901
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29aff8406235800000b, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
6902
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29aff8406235800000c, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
6903
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6904
+ Processing DefectCubicle @ Sat Jan 30 00:00:00 UTC 2010
6905
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6906
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6907
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6908
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
6909
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
6910
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
6911
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
6912
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
6913
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
6914
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
6915
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
6916
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
6917
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
6918
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6919
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6920
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6921
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
6922
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
6923
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
6924
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
6925
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
6926
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.0 seconds
6927
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6928
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6929
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6930
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
6931
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
6932
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
6933
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
6934
+ DefectCubicle aggregation [:month, :region] processed in 0.0 seconds
6935
+ DefectCubicle processed @ Sat Jan 30 00:00:00 UTC 2010in 0.0 seconds.
6936
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6937
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6938
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6939
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({manufacture_time:(this._id.manufacture_time), month:(this._id.month)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_manufacture_time.month", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
6940
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_time.month", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
6941
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_time.month", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
6942
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_time.month", :name=>"109_111", :key=>{"109"=>111}}])
6943
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6944
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{"_id.manufacture_time"=>{"$gte"=>Tue Dec 01 00:00:00 UTC 2009, "$lt"=>Fri Jan 01 00:00:00 UTC 2010}}, "source_collection"=>"defect_cubicles_cubicle"}, {}).limit(-1)
6945
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556442_83", "query"=>{}, "fields"=>nil}, {}).limit(-1)
6946
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556442_83.find({}, {})
6947
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6948
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556442_83"}, {}).limit(-1)
6949
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6950
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6951
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
6952
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6953
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
6954
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6955
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
6956
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6957
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
6958
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6959
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
6960
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6961
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_time.month"}, {}).limit(-1)
6962
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
6963
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29aff8406235800000d, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
6964
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29aff8406235800000e, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
6965
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29aff8406235800000f, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
6966
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29aff84062358000010, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
6967
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29aff84062358000011, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
6968
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6969
+ Processing DefectCubicle @ Sun Mar 14 00:47:22 -0800 2010
6970
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6971
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6972
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6973
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
6974
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
6975
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
6976
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
6977
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
6978
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
6979
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
6980
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
6981
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
6982
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
6983
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6984
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6985
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6986
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
6987
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
6988
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
6989
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
6990
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
6991
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.016002 seconds
6992
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6993
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6994
+ MONGODB cubicle_test.system.namespaces.find({}, {})
6995
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
6996
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
6997
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
6998
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
6999
+ DefectCubicle aggregation [:month, :region] processed in 0.017002 seconds
7000
+ DefectCubicle processed @ Sun Mar 14 00:47:22 -0800 2010in 0.072007 seconds.
7001
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7002
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7003
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7004
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_manufacture_date", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7005
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7006
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :name=>"109_97", :key=>{"109"=>97}}])
7007
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7008
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}, "source_collection"=>"defect_cubicles_cubicle"}, {}).limit(-1)
7009
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556442_88", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7010
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556442_88.find({}, {})
7011
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7012
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556442_88"}, {}).limit(-1)
7013
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7014
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7015
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7016
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7017
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7018
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7019
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7020
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7021
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date"}, {}).limit(-1)
7022
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7023
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7024
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7025
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7026
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7027
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29aff84062358000012, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7028
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29aff84062358000013, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7029
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29aff84062358000014, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7030
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29aff84062358000015, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7031
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29aff84062358000016, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7032
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7033
+ Processing DefectCubicle @ Sun Mar 14 00:47:22 -0800 2010
7034
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7035
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7036
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7037
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7038
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7039
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7040
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7041
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7042
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7043
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7044
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7045
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7046
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7047
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7048
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7049
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7050
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7051
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7052
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7053
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7054
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7055
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.015001 seconds
7056
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7057
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7058
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7059
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7060
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7061
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7062
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7063
+ DefectCubicle aggregation [:month, :region] processed in 0.017002 seconds
7064
+ DefectCubicle processed @ Sun Mar 14 00:47:22 -0800 2010in 0.057006 seconds.
7065
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7066
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7067
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7068
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_month.product.year", "map"=>" function(){emit({product:(this._id.product)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_product", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7069
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7070
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :name=>"112_114", :key=>{"112"=>114}}])
7071
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7072
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
7073
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7074
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7075
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7076
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7077
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7078
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7079
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7080
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7081
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7082
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7083
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7084
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7085
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
7086
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7087
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29aff84062358000017, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7088
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29aff84062358000018, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7089
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29aff84062358000019, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7090
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29aff8406235800001a, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7091
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29aff8406235800001b, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7092
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7093
+ Processing DefectCubicle @ Sun Mar 14 00:47:22 -0800 2010
7094
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7095
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7096
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7097
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7098
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7099
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7100
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7101
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7102
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7103
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7104
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7105
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7106
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7107
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7108
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7109
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7110
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7111
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7112
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7113
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7114
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7115
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.016001 seconds
7116
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7117
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7118
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7119
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7120
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7121
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7122
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7123
+ DefectCubicle aggregation [:month, :region] processed in 0.018002 seconds
7124
+ DefectCubicle processed @ Sun Mar 14 00:47:22 -0800 2010in 0.058006 seconds.
7125
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7126
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7127
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7128
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_month.product.year", "map"=>" function(){emit({product:(this._id.product)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_product", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7129
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7130
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :name=>"112_114", :key=>{"112"=>114}}])
7131
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7132
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
7133
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7134
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7135
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7136
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7137
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7138
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7139
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
7140
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7141
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7142
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7143
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7144
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7145
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7146
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7147
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29aff8406235800001c, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7148
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29aff8406235800001d, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7149
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29aff8406235800001e, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7150
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29aff8406235800001f, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7151
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29aff84062358000020, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7152
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7153
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({product:this.product.name},{total_defects:((this.defect_id) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n \n \n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7154
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556442_97", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7155
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556442_97.find({}, {})
7156
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7157
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556442_97"}, {}).limit(-1)
7158
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7159
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7160
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7161
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7162
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7163
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7164
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29aff84062358000021, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7165
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29bff84062358000022, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7166
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29bff84062358000023, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7167
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29bff84062358000024, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7168
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29bff84062358000025, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7169
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7170
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7171
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7172
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7173
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7174
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7175
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29bff84062358000026, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7176
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29bff84062358000027, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7177
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29bff84062358000028, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7178
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29bff84062358000029, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7179
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29bff8406235800002a, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7180
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7181
+ Processing DefectCubicle @ Tue Jan 05 00:00:00 UTC 2010
7182
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7183
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7184
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7185
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7186
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7187
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7188
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7189
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7190
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7191
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7192
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7193
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7194
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7195
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7196
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7197
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7198
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7199
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7200
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7201
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7202
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7203
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.0 seconds
7204
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7205
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7206
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7207
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7208
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7209
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7210
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7211
+ DefectCubicle aggregation [:month, :region] processed in 0.0 seconds
7212
+ DefectCubicle processed @ Tue Jan 05 00:00:00 UTC 2010in 0.0 seconds.
7213
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7214
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7215
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7216
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date), month:(this._id.month)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_manufacture_date.month", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7217
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.month", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7218
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.month", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7219
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.month", :name=>"109_111", :key=>{"109"=>111}}])
7220
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7221
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{"_id.manufacture_date"=>{"$gte"=>"2010-01-01", "$lte"=>"2010-01-05"}}, "source_collection"=>"defect_cubicles_cubicle"}, {}).limit(-1)
7222
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556443_102", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7223
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556443_102.find({}, {})
7224
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7225
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556443_102"}, {}).limit(-1)
7226
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7227
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7228
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7229
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7230
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7231
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7232
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7233
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7234
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7235
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7236
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7237
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7238
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date.month"}, {}).limit(-1)
7239
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7240
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29bff8406235800002b, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7241
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29bff8406235800002c, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7242
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29bff8406235800002d, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7243
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29bff8406235800002e, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7244
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29bff8406235800002f, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7245
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7246
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({month:(this.manufacture_date.substring(0,7))},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{"manufacture_date"=>{"$gte"=>"2010-01-01", "$lte"=>"2010-01-05"}}}, {}).limit(-1)
7247
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556443_103", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7248
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556443_103.find({}, {})
7249
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7250
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556443_103"}, {}).limit(-1)
7251
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7252
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7253
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7254
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7255
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7256
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7257
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29bff84062358000030, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7258
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29bff84062358000031, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7259
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29bff84062358000032, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7260
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29bff84062358000033, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7261
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29bff84062358000034, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7262
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7263
+ Processing DefectCubicle @ Mon Jan 04 00:00:00 UTC 2010
7264
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7265
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7266
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7267
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7268
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7269
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7270
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7271
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7272
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7273
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7274
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7275
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7276
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7277
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7278
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7279
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7280
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7281
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7282
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7283
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7284
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7285
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.0 seconds
7286
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7287
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7288
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7289
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7290
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7291
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7292
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7293
+ DefectCubicle aggregation [:month, :region] processed in 0.0 seconds
7294
+ DefectCubicle processed @ Mon Jan 04 00:00:00 UTC 2010in 0.0 seconds.
7295
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7296
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7297
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7298
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_manufacture_date", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7299
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7300
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :name=>"109_97", :key=>{"109"=>97}}])
7301
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7302
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{"_id.manufacture_date"=>{"$gte"=>"2010-01-01", "$lte"=>"2010-01-04"}}, "source_collection"=>"defect_cubicles_cubicle"}, {}).limit(-1)
7303
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556443_108", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7304
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556443_108.find({}, {})
7305
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7306
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556443_108"}, {}).limit(-1)
7307
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7308
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7309
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7310
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7311
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7312
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7313
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date"}, {}).limit(-1)
7314
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7315
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7316
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7317
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7318
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7319
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7320
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7321
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29bff84062358000035, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7322
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29bff84062358000036, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7323
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29bff84062358000037, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7324
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29bff84062358000038, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7325
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29bff84062358000039, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7326
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7327
+ Processing DefectCubicle @ Sat Jan 30 00:00:00 UTC 2010
7328
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7329
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7330
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7331
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7332
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7333
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7334
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7335
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7336
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7337
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7338
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7339
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7340
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7341
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7342
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7343
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7344
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7345
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7346
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7347
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7348
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7349
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.0 seconds
7350
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7351
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7352
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7353
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7354
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7355
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7356
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7357
+ DefectCubicle aggregation [:month, :region] processed in 0.0 seconds
7358
+ DefectCubicle processed @ Sat Jan 30 00:00:00 UTC 2010in 0.0 seconds.
7359
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7360
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7361
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7362
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date), month:(this._id.month)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_manufacture_date.month", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7363
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.month", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7364
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.month", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7365
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.month", :name=>"109_111", :key=>{"109"=>111}}])
7366
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7367
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{"_id.manufacture_date"=>{"$gte"=>"2009-12-01", "$lt"=>"2010-01-01"}}, "source_collection"=>"defect_cubicles_cubicle"}, {}).limit(-1)
7368
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556443_113", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7369
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556443_113.find({}, {})
7370
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7371
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556443_113"}, {}).limit(-1)
7372
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7373
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7374
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7375
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7376
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7377
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7378
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7379
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7380
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7381
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7382
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7383
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7384
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date.month"}, {}).limit(-1)
7385
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7386
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29bff8406235800003a, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7387
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29bff8406235800003b, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7388
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29bff8406235800003c, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7389
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29bff8406235800003d, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7390
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29bff8406235800003e, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7391
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7392
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({product:this.product.name},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7393
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556443_114", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7394
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556443_114.find({}, {})
7395
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7396
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556443_114"}, {}).limit(-1)
7397
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7398
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7399
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7400
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7401
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7402
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7403
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29bff8406235800003f, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7404
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29bff84062358000040, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7405
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29bff84062358000041, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7406
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29bff84062358000042, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7407
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29bff84062358000043, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7408
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7409
+ Processing DefectCubicle @ Sun Mar 14 00:47:23 -0800 2010
7410
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7411
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7412
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7413
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7414
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7415
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7416
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7417
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7418
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7419
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7420
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7421
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7422
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7423
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7424
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7425
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7426
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7427
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7428
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7429
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7430
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7431
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.017001 seconds
7432
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7433
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7434
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7435
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7436
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7437
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7438
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7439
+ DefectCubicle aggregation [:month, :region] processed in 0.017002 seconds
7440
+ DefectCubicle processed @ Sun Mar 14 00:47:23 -0800 2010in 0.057006 seconds.
7441
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7442
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7443
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7444
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_month.product.year", "map"=>" function(){emit({product:(this._id.product)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_product", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7445
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7446
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :name=>"112_114", :key=>{"112"=>114}}])
7447
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7448
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
7449
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7450
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7451
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7452
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7453
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7454
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7455
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7456
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7457
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7458
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7459
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7460
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7461
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
7462
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7463
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29bff84062358000044, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7464
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29bff84062358000045, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7465
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29bff84062358000046, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7466
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29bff84062358000047, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7467
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29bff84062358000048, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7468
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7469
+ Processing DefectCubicle @ Sun Mar 14 00:47:23 -0800 2010
7470
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7471
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7472
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7473
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7474
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7475
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7476
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7477
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7478
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7479
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7480
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7481
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7482
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7483
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7484
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7485
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7486
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7487
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7488
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7489
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7490
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7491
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.016002 seconds
7492
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7493
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7494
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7495
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7496
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7497
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7498
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7499
+ DefectCubicle aggregation [:month, :region] processed in 0.017002 seconds
7500
+ DefectCubicle processed @ Sun Mar 14 00:47:23 -0800 2010in 0.057006 seconds.
7501
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7502
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7503
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7504
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_manufacture_date", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7505
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7506
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :name=>"109_97", :key=>{"109"=>97}}])
7507
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7508
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}, "source_collection"=>"defect_cubicles_cubicle"}, {}).limit(-1)
7509
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556443_123", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7510
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556443_123.find({}, {})
7511
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7512
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556443_123"}, {}).limit(-1)
7513
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7514
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7515
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7516
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7517
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7518
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7519
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7520
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7521
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7522
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7523
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7524
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7525
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date"}, {}).limit(-1)
7526
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7527
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29cff84062358000049, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7528
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29cff8406235800004a, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7529
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29cff8406235800004b, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7530
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29cff8406235800004c, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7531
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29cff8406235800004d, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7532
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7533
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({product:this.product.name},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{"$where"=>"(this.manufacture_date.substring(0,7))=='2010-01'"}}, {}).limit(-1)
7534
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556444_124", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7535
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556444_124.find({}, {})
7536
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7537
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556444_124"}, {}).limit(-1)
7538
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7539
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7540
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7541
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7542
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7543
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7544
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29cff8406235800004e, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7545
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29cff8406235800004f, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7546
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29cff84062358000050, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7547
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29cff84062358000051, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7548
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29cff84062358000052, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7549
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7550
+ Processing DefectCubicle @ Sun Mar 14 00:47:24 -0800 2010
7551
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7552
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7553
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7554
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7555
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7556
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7557
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7558
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7559
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7560
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7561
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7562
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7563
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7564
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7565
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7566
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7567
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7568
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7569
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7570
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7571
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7572
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.016002 seconds
7573
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7574
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7575
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7576
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7577
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7578
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7579
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7580
+ DefectCubicle aggregation [:month, :region] processed in 0.018002 seconds
7581
+ DefectCubicle processed @ Sun Mar 14 00:47:24 -0800 2010in 0.058006 seconds.
7582
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7583
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7584
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7585
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_month.product.year", "map"=>" function(){emit({product:(this._id.product)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_product", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7586
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7587
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :name=>"112_114", :key=>{"112"=>114}}])
7588
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7589
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({"_id.product"=>"Sad Day Moonshine"}, {})
7590
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7591
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7592
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7593
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7594
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7595
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7596
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7597
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7598
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7599
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7600
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7601
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7602
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
7603
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7604
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29cff84062358000053, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7605
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29cff84062358000054, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7606
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29cff84062358000055, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7607
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29cff84062358000056, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7608
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29cff84062358000057, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7609
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7610
+ Processing DefectCubicle @ Sun Mar 14 00:47:24 -0800 2010
7611
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7612
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7613
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7614
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7615
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7616
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7617
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7618
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7619
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7620
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7621
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7622
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7623
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7624
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7625
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7626
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7627
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7628
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7629
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7630
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7631
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7632
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.016001 seconds
7633
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7634
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7635
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7636
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7637
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7638
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7639
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7640
+ DefectCubicle aggregation [:month, :region] processed in 0.018002 seconds
7641
+ DefectCubicle processed @ Sun Mar 14 00:47:24 -0800 2010in 0.058006 seconds.
7642
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7643
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7644
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7645
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_month.product.year", "map"=>" function(){emit({product:(this._id.product)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_product", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7646
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7647
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :name=>"112_114", :key=>{"112"=>114}}])
7648
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7649
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({"$where"=>"this._id.product=='Sad Day Moonshine'"}, {})
7650
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7651
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7652
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7653
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7654
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7655
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7656
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7657
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7658
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7659
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7660
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7661
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7662
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
7663
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7664
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29cff84062358000058, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7665
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29cff84062358000059, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7666
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29cff8406235800005a, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7667
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29cff8406235800005b, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7668
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29cff8406235800005c, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7669
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7670
+ Processing DefectCubicle @ Sun Mar 14 00:47:24 -0800 2010
7671
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7672
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7673
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7674
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7675
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7676
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7677
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7678
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7679
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7680
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7681
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7682
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7683
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7684
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7685
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7686
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7687
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7688
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7689
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7690
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7691
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7692
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.015001 seconds
7693
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7694
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7695
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7696
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7697
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7698
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7699
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7700
+ DefectCubicle aggregation [:month, :region] processed in 0.018002 seconds
7701
+ DefectCubicle processed @ Sun Mar 14 00:47:24 -0800 2010in 0.057005 seconds.
7702
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7703
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7704
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7705
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date), manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_manufacture_date.manufacture_date", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7706
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.manufacture_date", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7707
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.manufacture_date", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7708
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.manufacture_date", :name=>"109_97", :key=>{"109"=>97}}])
7709
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7710
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{"_id.manufacture_date"=>"2009-12-09"}, "source_collection"=>"defect_cubicles_cubicle"}, {}).limit(-1)
7711
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556444_137", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7712
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556444_137.find({}, {})
7713
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7714
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556444_137"}, {}).limit(-1)
7715
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7716
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7717
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7718
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7719
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7720
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7721
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7722
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7723
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7724
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7725
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7726
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7727
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date.manufacture_date"}, {}).limit(-1)
7728
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7729
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29cff8406235800005d, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7730
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29cff8406235800005e, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7731
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29cff8406235800005f, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7732
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29cff84062358000060, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7733
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29cff84062358000061, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7734
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7735
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({product:this.product.name},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{"product.name"=>"Sad Day Moonshine"}}, {}).limit(-1)
7736
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556444_138", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7737
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556444_138.find({}, {})
7738
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7739
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556444_138"}, {}).limit(-1)
7740
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7741
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7742
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7743
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7744
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7745
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7746
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29cff84062358000062, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7747
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29cff84062358000063, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7748
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29cff84062358000064, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7749
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29cff84062358000065, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7750
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29cff84062358000066, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7751
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7752
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({product:this.product.name},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{"$where"=>"this.product.name=='Sad Day Moonshine'"}}, {}).limit(-1)
7753
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556444_139", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7754
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556444_139.find({}, {})
7755
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7756
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556444_139"}, {}).limit(-1)
7757
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7758
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7759
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7760
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7761
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7762
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7763
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29cff84062358000067, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7764
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29cff84062358000068, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7765
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29cff84062358000069, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7766
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29cff8406235800006a, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7767
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29cff8406235800006b, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7768
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7769
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{"manufacture_date"=>"2009-12-09"}}, {}).limit(-1)
7770
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556444_140", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7771
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556444_140.find({}, {})
7772
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7773
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556444_140"}, {}).limit(-1)
7774
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7775
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7776
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7777
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7778
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7779
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7780
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29cff8406235800006c, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7781
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29cff8406235800006d, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7782
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29cff8406235800006e, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7783
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29cff8406235800006f, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7784
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29cff84062358000070, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7785
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7786
+ Processing DefectCubicle @ Sun Mar 14 00:47:24 -0800 2010
7787
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7788
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7789
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7790
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7791
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7792
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7793
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7794
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7795
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7796
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7797
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7798
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7799
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7800
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7801
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7802
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7803
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7804
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7805
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7806
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7807
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7808
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.017001 seconds
7809
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7810
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7811
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7812
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7813
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7814
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7815
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7816
+ DefectCubicle aggregation [:month, :region] processed in 0.017002 seconds
7817
+ DefectCubicle processed @ Sun Mar 14 00:47:24 -0800 2010in 0.058006 seconds.
7818
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7819
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7820
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7821
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_month.product.year", "map"=>" function(){emit({product:(this._id.product)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_product", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7822
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7823
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :name=>"112_114", :key=>{"112"=>114}}])
7824
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7825
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
7826
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7827
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7828
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7829
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7830
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7831
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7832
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7833
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7834
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7835
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7836
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7837
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7838
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
7839
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7840
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29cff84062358000071, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7841
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29cff84062358000072, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7842
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29cff84062358000073, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7843
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29cff84062358000074, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7844
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29cff84062358000075, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7845
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7846
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({product:this.product.name},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7847
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556444_145", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7848
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556444_145.find({}, {})
7849
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7850
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556444_145"}, {}).limit(-1)
7851
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7852
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7853
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7854
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7855
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7856
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7857
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29dff84062358000076, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7858
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29dff84062358000077, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7859
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29dff84062358000078, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7860
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29dff84062358000079, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7861
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29dff8406235800007a, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7862
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7863
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7864
+ Processing DefectCubicle @ Sun Mar 14 00:47:25 -0800 2010
7865
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7866
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7867
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7868
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7869
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7870
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7871
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7872
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7873
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7874
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7875
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7876
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7877
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7878
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7879
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7880
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7881
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7882
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7883
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7884
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7885
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7886
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.016001 seconds
7887
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7888
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7889
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7890
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7891
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7892
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7893
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7894
+ DefectCubicle aggregation [:month, :region] processed in 0.017002 seconds
7895
+ DefectCubicle processed @ Sun Mar 14 00:47:25 -0800 2010in 0.057006 seconds.
7896
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7897
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7898
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7899
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7900
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7901
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7902
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7903
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7904
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7905
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7906
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7907
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7908
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
7909
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
7910
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"1", :_id=>4b9ca29dff8406235800007b, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>0.78}])
7911
+ MONGODB db.defects.insert([{:manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :plant=>{:name=>"Plant2", :address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :operator=>"Seymour", :defect_id=>"2", :_id=>4b9ca29dff8406235800007c, :outcome=>"Discarded", :manufacture_date=>"2010-01-05", :cost=>0.02}])
7912
+ MONGODB db.defects.insert([{:manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :plant=>{:name=>"Plant1", :address=>{:location=>"San Francisco, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Zooey", :defect_id=>"3", :_id=>4b9ca29dff8406235800007d, :outcome=>"Consumed", :manufacture_date=>"2010-02-01", :cost=>2.94}])
7913
+ MONGODB db.defects.insert([{:manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :plant=>{:name=>"Plant19", :address=>{:location=>"Burmingham, Al", :region=>"South"}}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :operator=>"Buddy", :defect_id=>"4", :_id=>4b9ca29dff8406235800007e, :outcome=>"Repaired", :manufacture_date=>"2009-12-09", :cost=>0.43}])
7914
+ MONGODB db.defects.insert([{:manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :plant=>{:name=>"Plant3", :address=>{:location=>"Oakland, Ca", :region=>"West"}}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :operator=>"Franny", :defect_id=>"5", :_id=>4b9ca29dff8406235800007f, :outcome=>"Repaired", :manufacture_date=>"2010-01-01", :cost=>12.19}])
7915
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7916
+ Processing DefectCubicle @ Sun Mar 14 00:47:25 -0800 2010
7917
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7918
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7919
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7920
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defects", "map"=>" function(){emit({manufacture_date:this.manufacture_date, month:(this.manufacture_date.substring(0,7)), year:(this.manufacture_date.substring(0,4)), manufacture_time:this.manufacture_time, product:this.product.name, region:this.plant.address.region, operator:this.operator, outcome:this.outcome},{total_defects:((this.defect_id) ? 1 : 0), preventable_defects:(((this.root_cause != \"act_of_god\")) ? 1 : 0), total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7921
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7922
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7923
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7924
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_1_0", :key=>{"109"=>97, "1"=>0}}])
7925
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7926
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7927
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_112_1_0", :key=>{"111"=>112, "1"=>0}}])
7928
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"111_117_1_0", :key=>{"111"=>117, "1"=>0}}])
7929
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle", :name=>"109_97_121_101_112_114_114_101_111_117", :key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}}])
7930
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7931
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7932
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7933
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), product:(this._id.product), year:(this._id.year)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.product.year", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7934
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7935
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"112_114_1_0", :key=>{"112"=>114, "1"=>0}}])
7936
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"121_101_1_0", :key=>{"121"=>101, "1"=>0}}])
7937
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :name=>"109_111_112_114_121_101", :key=>{"109"=>111, "112"=>114, "121"=>101}}])
7938
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.017002 seconds
7939
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7940
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7941
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7942
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({month:(this._id.month), region:(this._id.region)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "out"=>"defect_cubicles_cubicle_aggregation_month.region", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}}, {}).limit(-1)
7943
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_1_0", :key=>{"109"=>111, "1"=>0}}])
7944
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"114_101_1_0", :key=>{"114"=>101, "1"=>0}}])
7945
+ MONGODB db.system.indexes.insert([{:unique=>false, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :name=>"109_111_114_101", :key=>{"109"=>111, "114"=>101}}])
7946
+ DefectCubicle aggregation [:month, :region] processed in 0.017002 seconds
7947
+ DefectCubicle processed @ Sun Mar 14 00:47:25 -0800 2010in 0.059006 seconds.
7948
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7949
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date), month:(this._id.month), year:(this._id.year), manufacture_time:(this._id.manufacture_time), product:(this._id.product), region:(this._id.region), operator:(this._id.operator), outcome:(this._id.outcome)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), total_cost:(this.value.total_cost), avg_cost:(this.value.avg_cost*this.value.avg_cost_count), avg_cost_count:(this.value.avg_cost_count)});}\n", "reduce"=>" function(key,values){\n\tvar output = {};\n\tvalues.forEach(function(doc){\n for(var key in doc){\n\t\t\tif (doc[key] != null){\n\t\t\t\toutput[key] = output[key] || 0;\n\t\t\t\toutput[key] += doc[key];\n\t\t\t}\n\t\t}\n\t });\n\treturn output;\n }\n", "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\n value.preventable_pct=(value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0);\n return value;\n }\n", "query"=>{}, "source_collection"=>"defect_cubicles_cubicle"}, {}).limit(-1)
7950
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1268556445_152", "query"=>{}, "fields"=>nil}, {}).limit(-1)
7951
+ MONGODB cubicle_test.tmp.mr.mapreduce_1268556445_152.find({}, {})
7952
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7953
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1268556445_152"}, {}).limit(-1)
7954
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7955
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7956
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
7957
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7958
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
7959
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7960
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
7961
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7962
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
7963
+ MONGODB cubicle_test.system.namespaces.find({}, {})
7964
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)