cubicle 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/cubicle.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cubicle}
8
- s.version = "0.1.6"
8
+ s.version = "0.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nathan Stults"]
12
- s.date = %q{2010-03-29}
12
+ s.date = %q{2010-04-04}
13
13
  s.description = %q{Cubicle provides a dsl and aggregation caching framework for automating the generation, execution and caching of map reduce queries when using MongoDB in Ruby. Cubicle also includes a MongoMapper plugin for quickly performing ad-hoc, multi-level group-by queries against a MongoMapper model.}
14
14
  s.email = %q{hereiam@sonic.net}
15
15
  s.extra_rdoc_files = [
@@ -1,27 +1,27 @@
1
- class OrderedHashWithIndifferentAccess < OrderedHash
2
- def initialize(initial_data={},&block)
3
- merge!(initial_data.stringify_keys)
4
- super(&block) if block
5
- end
6
-
7
-
8
- def [](key)
9
- key = key.to_s
10
- #self[key] = [] unless self.keys.include?(key)
11
- super(key)
12
- end
13
-
14
- def []=(key,val)
15
- super(key.to_s,val)
16
- end
17
-
18
- def include?(key)
19
- super(key.to_s)
20
- end
21
-
22
- def method_missing(sym,*args,&block)
23
- return self[sym.to_s[0..-2]] = args[0] if sym.to_s =~ /.*=$/
24
- return self[sym] if self.keys.include?(sym.to_s)
25
- missing_member_default
26
- end
1
+ class OrderedHashWithIndifferentAccess < OrderedHash
2
+ def initialize(initial_data={},&block)
3
+ merge!(initial_data.stringify_keys)
4
+ super(&block) if block
5
+ end
6
+
7
+
8
+ def [](key)
9
+ key = key.to_s
10
+ #self[key] = [] unless self.keys.include?(key)
11
+ super(key)
12
+ end
13
+
14
+ def []=(key,val)
15
+ super(key.to_s,val)
16
+ end
17
+
18
+ def include?(key)
19
+ super(key.to_s)
20
+ end
21
+
22
+ def method_missing(sym,*args,&block)
23
+ return self[sym.to_s[0..-2]] = args[0] if sym.to_s =~ /.*=$/
24
+ return self[sym] if include?(sym)
25
+ nil
26
+ end
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module Cubicle
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
data/test/log/test.log CHANGED
@@ -16131,3 +16131,1763 @@ DefectCubicle processed @ Mon Mar 29 16:19:36 -0700 2010in 0.072007 seconds.
16131
16131
  MONGODB cubicle_test.system.namespaces.find({}, {})
16132
16132
  MONGODB cubicle_test.system.namespaces.find({}, {})
16133
16133
  MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16134
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16135
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb50688ff8406264c000001, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16136
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb50688ff8406264c000002, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16137
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb50688ff8406264c000003, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16138
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb50688ff8406264c000004, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16139
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb50688ff8406264c000005, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16140
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16141
+ 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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n \n \n return value;\n }\n"}, {}).limit(-1)
16142
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154889_723", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16143
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154889_723.find({}, {})
16144
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16145
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154889_723"}, {}).limit(-1)
16146
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16147
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16148
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16149
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16150
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16151
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16152
+ MONGODB db.#<class:0x3dd6898>s.update({:_id=>4bb50689ff8406264c000006}, {"_id"=>4bb50689ff8406264c000006, "a_string"=>"hi", "a_float"=>1.0})
16153
+ MONGODB db.#<class:0x3dd6898>s.update({:_id=>4bb50689ff8406264c000007}, {"_id"=>4bb50689ff8406264c000007, "a_string"=>"hi", "a_float"=>2.5})
16154
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16155
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"#<class:0x3dd6898>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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n \n \n return value;\n }\n"}, {}).limit(-1)
16156
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154889_724", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16157
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154889_724.find({}, {})
16158
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16159
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154889_724"}, {}).limit(-1)
16160
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16161
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16162
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16163
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16164
+ MONGODB cubicle_test.$cmd.find({:drop=>"#<class:0x3dd6898>s"}, {}).limit(-1)
16165
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16166
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb50689ff8406264c000008, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16167
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb50689ff8406264c000009, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16168
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb50689ff8406264c00000a, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16169
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb50689ff8406264c00000b, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16170
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb50689ff8406264c00000c, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16171
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16172
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16173
+ Processing DefectCubicle @ Thu Apr 01 13:48:09 -0700 2010
16174
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16175
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16176
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16177
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154889000)) ? ((new Date(1270154889000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154889000)) ? ((new Date(1270154889000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16178
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16179
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16180
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16181
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16182
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16183
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16184
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16185
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16186
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16187
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16188
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16189
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16190
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16191
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16192
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16193
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16194
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16195
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.021002 seconds
16196
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16197
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16198
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16199
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16200
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16201
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16202
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16203
+ DefectCubicle aggregation [:month, :region] processed in 0.026002 seconds
16204
+ DefectCubicle processed @ Thu Apr 01 13:48:09 -0700 2010in 0.087008 seconds.
16205
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16206
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16207
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16208
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16209
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16210
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16211
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16212
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16213
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16214
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16215
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16216
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16217
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16218
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16219
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb50689ff8406264c00000d, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16220
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb50689ff8406264c00000e, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16221
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb50689ff8406264c00000f, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16222
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb50689ff8406264c000010, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16223
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb50689ff8406264c000011, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16224
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16225
+ Processing DefectCubicle @ Thu Apr 01 13:48:09 -0700 2010
16226
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16227
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16228
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16229
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154889000)) ? ((new Date(1270154889000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154889000)) ? ((new Date(1270154889000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16230
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16231
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16232
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16233
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16234
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16235
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16236
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16237
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16238
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16239
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16240
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16241
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16242
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16243
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16244
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16245
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16246
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16247
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.028003 seconds
16248
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16249
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16250
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16251
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16252
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16253
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16254
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16255
+ DefectCubicle aggregation [:month, :region] processed in 0.021002 seconds
16256
+ DefectCubicle processed @ Thu Apr 01 13:48:09 -0700 2010in 0.081008 seconds.
16257
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16258
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16259
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154889_731", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16260
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154889_731.find({}, {})
16261
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16262
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154889_731"}, {}).limit(-1)
16263
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16264
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16265
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16266
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16267
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16268
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16269
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16270
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16271
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16272
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16273
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16274
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16275
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb50689ff8406264c000012, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16276
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb50689ff8406264c000013, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16277
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb50689ff8406264c000014, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16278
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb50689ff8406264c000015, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16279
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb50689ff8406264c000016, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16280
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16281
+ Processing DefectCubicle @ Sat Jan 30 00:00:00 UTC 2010
16282
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16283
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16284
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16285
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1264809600000)) ? ((new Date(1264809600000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1264809600000)) ? ((new Date(1264809600000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16286
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16287
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16288
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16289
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16290
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16291
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16292
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16293
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16294
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16295
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16296
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16297
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16298
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16299
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16300
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16301
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16302
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16303
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.0 seconds
16304
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16305
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16306
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16307
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16308
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16309
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16310
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16311
+ DefectCubicle aggregation [:month, :region] processed in 0.0 seconds
16312
+ DefectCubicle processed @ Sat Jan 30 00:00:00 UTC 2010in 0.0 seconds.
16313
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16314
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16315
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16316
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16317
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_time.month", :unique=>false, :name=>"109_97_1_0"}])
16318
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_time.month", :unique=>false, :name=>"109_111_1_0"}])
16319
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_time.month", :unique=>false, :name=>"109_111"}])
16320
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16321
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_manufacture_time.month", "map"=>" function(){emit({month:(this._id.month)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{"_id.manufacture_time"=>{"$gte"=>Tue Dec 01 00:00:00 UTC 2009, "$lt"=>Fri Jan 01 00:00:00 UTC 2010}}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16322
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154890_736", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16323
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154890_736.find({}, {})
16324
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16325
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154890_736"}, {}).limit(-1)
16326
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16327
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16328
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16329
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16330
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16331
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16332
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16333
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16334
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16335
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16336
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16337
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16338
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_time.month"}, {}).limit(-1)
16339
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16340
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068aff8406264c000017, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16341
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068aff8406264c000018, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16342
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068aff8406264c000019, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16343
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068aff8406264c00001a, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16344
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068aff8406264c00001b, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16345
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16346
+ Processing DefectCubicle @ Thu Apr 01 13:48:10 -0700 2010
16347
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16348
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16349
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16350
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154890000)) ? ((new Date(1270154890000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154890000)) ? ((new Date(1270154890000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16351
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16352
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16353
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16354
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16355
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16356
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16357
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16358
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16359
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16360
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16361
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16362
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16363
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16364
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16365
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16366
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16367
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16368
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.020002 seconds
16369
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16370
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16371
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16372
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16373
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16374
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16375
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16376
+ DefectCubicle aggregation [:month, :region] processed in 0.023002 seconds
16377
+ DefectCubicle processed @ Thu Apr 01 13:48:10 -0700 2010in 0.072007 seconds.
16378
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16379
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16380
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16381
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16382
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :unique=>false, :name=>"109_97_1_0"}])
16383
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :unique=>false, :name=>"109_97"}])
16384
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16385
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_manufacture_date", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16386
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154890_741", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16387
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154890_741.find({}, {})
16388
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16389
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154890_741"}, {}).limit(-1)
16390
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16391
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16392
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16393
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16394
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16395
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16396
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16397
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16398
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16399
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16400
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16401
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16402
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date"}, {}).limit(-1)
16403
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16404
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068aff8406264c00001c, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16405
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068aff8406264c00001d, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16406
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068aff8406264c00001e, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16407
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068aff8406264c00001f, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16408
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068aff8406264c000020, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16409
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16410
+ Processing DefectCubicle @ Thu Apr 01 13:48:10 -0700 2010
16411
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16412
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16413
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16414
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154890000)) ? ((new Date(1270154890000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154890000)) ? ((new Date(1270154890000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16415
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16416
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16417
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16418
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16419
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16420
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16421
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16422
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16423
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16424
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16425
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16426
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16427
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16428
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16429
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16430
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16431
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16432
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.024003 seconds
16433
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16434
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16435
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16436
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16437
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16438
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16439
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16440
+ DefectCubicle aggregation [:month, :region] processed in 0.022002 seconds
16441
+ DefectCubicle processed @ Thu Apr 01 13:48:10 -0700 2010in 0.074007 seconds.
16442
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16443
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16444
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16445
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16446
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114_1_0"}])
16447
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114"}])
16448
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16449
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
16450
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16451
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16452
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16453
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16454
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16455
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16456
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16457
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16458
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16459
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16460
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16461
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16462
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
16463
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16464
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068aff8406264c000021, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16465
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068aff8406264c000022, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16466
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068aff8406264c000023, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16467
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068aff8406264c000024, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16468
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068aff8406264c000025, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16469
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16470
+ Processing DefectCubicle @ Thu Apr 01 13:48:10 -0700 2010
16471
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16472
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16473
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16474
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154890000)) ? ((new Date(1270154890000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154890000)) ? ((new Date(1270154890000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16475
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16476
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16477
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16478
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16479
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16480
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16481
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16482
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16483
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16484
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16485
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16486
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16487
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16488
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16489
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16490
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16491
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16492
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.027002 seconds
16493
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16494
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16495
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16496
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16497
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16498
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16499
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16500
+ DefectCubicle aggregation [:month, :region] processed in 0.022003 seconds
16501
+ DefectCubicle processed @ Thu Apr 01 13:48:10 -0700 2010in 0.077008 seconds.
16502
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16503
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16504
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16505
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16506
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114_1_0"}])
16507
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114"}])
16508
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16509
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
16510
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16511
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16512
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16513
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16514
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16515
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16516
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16517
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16518
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16519
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16520
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16521
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16522
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
16523
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16524
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068aff8406264c000026, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16525
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068aff8406264c000027, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16526
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068aff8406264c000028, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16527
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068aff8406264c000029, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16528
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068aff8406264c00002a, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16529
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16530
+ 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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n \n \n return value;\n }\n"}, {}).limit(-1)
16531
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154890_750", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16532
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154890_750.find({}, {})
16533
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16534
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154890_750"}, {}).limit(-1)
16535
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16536
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16537
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16538
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16539
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16540
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16541
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068aff8406264c00002b, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16542
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068aff8406264c00002c, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16543
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068aff8406264c00002d, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16544
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068aff8406264c00002e, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16545
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068aff8406264c00002f, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16546
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16547
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16548
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16549
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16550
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16551
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16552
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068aff8406264c000030, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16553
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068aff8406264c000031, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16554
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068aff8406264c000032, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16555
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068aff8406264c000033, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16556
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068aff8406264c000034, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16557
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16558
+ Processing DefectCubicle @ Thu Apr 01 13:48:10 -0700 2010
16559
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16560
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16561
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16562
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154890000)) ? ((new Date(1270154890000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154890000)) ? ((new Date(1270154890000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16563
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16564
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16565
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16566
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16567
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16568
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16569
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16570
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16571
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16572
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16573
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16574
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16575
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16576
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16577
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16578
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16579
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16580
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.021002 seconds
16581
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16582
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16583
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16584
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16585
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16586
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16587
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16588
+ DefectCubicle aggregation [:month, :region] processed in 0.023002 seconds
16589
+ DefectCubicle processed @ Thu Apr 01 13:48:10 -0700 2010in 0.071007 seconds.
16590
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16591
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16592
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16593
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16594
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :unique=>false, :name=>"109_97_1_0"}])
16595
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :unique=>false, :name=>"109_97"}])
16596
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16597
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_manufacture_date", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16598
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154890_755", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16599
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154890_755.find({}, {})
16600
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16601
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154890_755"}, {}).limit(-1)
16602
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16603
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16604
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16605
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16606
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16607
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16608
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16609
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16610
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16611
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16612
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16613
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16614
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date"}, {}).limit(-1)
16615
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16616
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068bff8406264c000035, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16617
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068bff8406264c000036, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16618
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068bff8406264c000037, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16619
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068bff8406264c000038, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16620
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068bff8406264c000039, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16621
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16622
+ Processing DefectCubicle @ Thu Apr 01 13:48:11 -0700 2010
16623
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16624
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16625
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16626
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154891000)) ? ((new Date(1270154891000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154891000)) ? ((new Date(1270154891000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16627
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16628
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16629
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16630
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16631
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16632
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16633
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16634
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16635
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16636
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16637
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16638
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16639
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16640
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16641
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16642
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16643
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16644
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.058006 seconds
16645
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16646
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16647
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16648
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16649
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16650
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16651
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16652
+ DefectCubicle aggregation [:month, :region] processed in 0.022002 seconds
16653
+ DefectCubicle processed @ Thu Apr 01 13:48:11 -0700 2010in 0.108011 seconds.
16654
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16655
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16656
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16657
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16658
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114_1_0"}])
16659
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114"}])
16660
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16661
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
16662
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16663
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16664
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16665
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16666
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16667
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16668
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16669
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16670
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16671
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16672
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16673
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16674
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
16675
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16676
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068bff8406264c00003a, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16677
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068bff8406264c00003b, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16678
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068bff8406264c00003c, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16679
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068bff8406264c00003d, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16680
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068bff8406264c00003e, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16681
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16682
+ Processing DefectCubicle @ Thu Apr 01 13:48:11 -0700 2010
16683
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16684
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16685
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16686
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154891000)) ? ((new Date(1270154891000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154891000)) ? ((new Date(1270154891000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16687
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16688
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16689
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16690
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16691
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16692
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16693
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16694
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16695
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16696
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16697
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16698
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16699
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16700
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16701
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16702
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16703
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16704
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.020002 seconds
16705
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16706
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16707
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16708
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16709
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16710
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16711
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16712
+ DefectCubicle aggregation [:month, :region] processed in 0.024002 seconds
16713
+ DefectCubicle processed @ Thu Apr 01 13:48:11 -0700 2010in 0.072007 seconds.
16714
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16715
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16716
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16717
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16718
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114_1_0"}])
16719
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114"}])
16720
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16721
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({"_id.product"=>"Sad Day Moonshine"}, {})
16722
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16723
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16724
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16725
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16726
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16727
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16728
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16729
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16730
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16731
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16732
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16733
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16734
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
16735
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16736
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068bff8406264c00003f, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16737
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068bff8406264c000040, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16738
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068bff8406264c000041, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16739
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068bff8406264c000042, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16740
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068bff8406264c000043, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16741
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16742
+ Processing DefectCubicle @ Tue Jan 05 00:00:00 UTC 2010
16743
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16744
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16745
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16746
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1262649600000)) ? ((new Date(1262649600000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1262649600000)) ? ((new Date(1262649600000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16747
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16748
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16749
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16750
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16751
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16752
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16753
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16754
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16755
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16756
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16757
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16758
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16759
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16760
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16761
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16762
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16763
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16764
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.0 seconds
16765
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16766
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16767
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16768
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16769
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16770
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16771
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16772
+ DefectCubicle aggregation [:month, :region] processed in 0.0 seconds
16773
+ DefectCubicle processed @ Tue Jan 05 00:00:00 UTC 2010in 0.0 seconds.
16774
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16775
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16776
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16777
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16778
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.month", :unique=>false, :name=>"109_97_1_0"}])
16779
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.month", :unique=>false, :name=>"109_111_1_0"}])
16780
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.month", :unique=>false, :name=>"109_111"}])
16781
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16782
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_manufacture_date.month", "map"=>" function(){emit({month:(this._id.month)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{"_id.manufacture_date"=>{"$gte"=>"2010-01-01", "$lte"=>"2010-01-05"}}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16783
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154891_768", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16784
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154891_768.find({}, {})
16785
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16786
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154891_768"}, {}).limit(-1)
16787
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16788
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16789
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16790
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16791
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16792
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16793
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16794
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16795
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16796
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16797
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16798
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16799
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date.month"}, {}).limit(-1)
16800
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16801
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068bff8406264c000044, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16802
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068bff8406264c000045, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16803
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068bff8406264c000046, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16804
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068bff8406264c000047, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16805
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068bff8406264c000048, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16806
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16807
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1262649600000)) ? ((new Date(1262649600000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1262649600000)) ? ((new Date(1262649600000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{"manufacture_date"=>{"$gte"=>"2010-01-01", "$lte"=>"2010-01-05"}}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16808
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154891_769", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16809
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154891_769.find({}, {})
16810
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16811
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154891_769"}, {}).limit(-1)
16812
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16813
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16814
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16815
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16816
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16817
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16818
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068bff8406264c000049, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16819
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068bff8406264c00004a, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16820
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068bff8406264c00004b, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16821
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068bff8406264c00004c, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16822
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068bff8406264c00004d, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16823
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16824
+ Processing DefectCubicle @ Mon Jan 04 00:00:00 UTC 2010
16825
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16826
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16827
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16828
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1262563200000)) ? ((new Date(1262563200000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1262563200000)) ? ((new Date(1262563200000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16829
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16830
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16831
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16832
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16833
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16834
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16835
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16836
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16837
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16838
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16839
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16840
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16841
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16842
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16843
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16844
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16845
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16846
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.0 seconds
16847
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16848
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16849
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16850
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16851
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16852
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16853
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16854
+ DefectCubicle aggregation [:month, :region] processed in 0.0 seconds
16855
+ DefectCubicle processed @ Mon Jan 04 00:00:00 UTC 2010in 0.0 seconds.
16856
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16857
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16858
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16859
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16860
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :unique=>false, :name=>"109_97_1_0"}])
16861
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :unique=>false, :name=>"109_97"}])
16862
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16863
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_manufacture_date", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{"_id.manufacture_date"=>{"$gte"=>"2010-01-01", "$lte"=>"2010-01-04"}}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16864
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154891_774", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16865
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154891_774.find({}, {})
16866
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16867
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154891_774"}, {}).limit(-1)
16868
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16869
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16870
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16871
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16872
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16873
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16874
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16875
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16876
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16877
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16878
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16879
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16880
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date"}, {}).limit(-1)
16881
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16882
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c00004e, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16883
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068cff8406264c00004f, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16884
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068cff8406264c000050, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16885
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c000051, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16886
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068cff8406264c000052, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16887
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16888
+ Processing DefectCubicle @ Wed Jan 01 00:00:00 UTC 2020
16889
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16890
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16891
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16892
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1577836800000)) ? ((new Date(1577836800000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1577836800000)) ? ((new Date(1577836800000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16893
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16894
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16895
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16896
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16897
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16898
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16899
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16900
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16901
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16902
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16903
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16904
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16905
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16906
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16907
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16908
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16909
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16910
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.0 seconds
16911
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16912
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16913
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16914
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16915
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16916
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16917
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16918
+ DefectCubicle aggregation [:month, :region] processed in 0.0 seconds
16919
+ DefectCubicle processed @ Wed Jan 01 00:00:00 UTC 2020in 0.0 seconds.
16920
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16921
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16922
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16923
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_month.region", "map"=>" function(){emit({month:(this._id.month)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16924
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month", :unique=>false, :name=>"109_111_1_0"}])
16925
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month", :unique=>false, :name=>"109_111"}])
16926
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_month", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16927
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_month.find({"_id.month"=>{"$gte"=>"2019-01", "$lt"=>"2020-01"}}, {})
16928
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16929
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16930
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16931
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16932
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16933
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16934
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16935
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16936
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16937
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16938
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16939
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16940
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month"}, {}).limit(-1)
16941
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
16942
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c000053, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16943
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068cff8406264c000054, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
16944
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068cff8406264c000055, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
16945
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c000056, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
16946
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068cff8406264c000057, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
16947
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16948
+ Processing DefectCubicle @ Sat Jan 30 00:00:00 UTC 2010
16949
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16950
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16951
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16952
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1264809600000)) ? ((new Date(1264809600000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1264809600000)) ? ((new Date(1264809600000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16953
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16954
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
16955
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
16956
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
16957
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
16958
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
16959
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
16960
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
16961
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
16962
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16963
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16964
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16965
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16966
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
16967
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
16968
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
16969
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
16970
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.0 seconds
16971
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16972
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16973
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16974
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16975
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
16976
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
16977
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
16978
+ DefectCubicle aggregation [:month, :region] processed in 0.0 seconds
16979
+ DefectCubicle processed @ Sat Jan 30 00:00:00 UTC 2010in 0.0 seconds.
16980
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16981
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16982
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16983
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_month.region", "map"=>" function(){emit({month:(this._id.month)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
16984
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month", :unique=>false, :name=>"109_111_1_0"}])
16985
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month", :unique=>false, :name=>"109_111"}])
16986
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_month", "query"=>{}, "fields"=>nil}, {}).limit(-1)
16987
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_month.find({"_id.month"=>{"$gte"=>"2009-01", "$lt"=>"2010-01"}}, {})
16988
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16989
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16990
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
16991
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16992
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
16993
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16994
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
16995
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16996
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
16997
+ MONGODB cubicle_test.system.namespaces.find({}, {})
16998
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
16999
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17000
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month"}, {}).limit(-1)
17001
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17002
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c000058, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17003
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068cff8406264c000059, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17004
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068cff8406264c00005a, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17005
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c00005b, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17006
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068cff8406264c00005c, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17007
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17008
+ Processing DefectCubicle @ Sat Jan 30 00:00:00 UTC 2010
17009
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17010
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17011
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17012
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1264809600000)) ? ((new Date(1264809600000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1264809600000)) ? ((new Date(1264809600000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17013
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17014
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
17015
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
17016
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17017
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
17018
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
17019
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
17020
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
17021
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
17022
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17023
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17024
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17025
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17026
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
17027
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
17028
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
17029
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
17030
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.0 seconds
17031
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17032
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17033
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17034
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17035
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
17036
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
17037
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
17038
+ DefectCubicle aggregation [:month, :region] processed in 0.0 seconds
17039
+ DefectCubicle processed @ Sat Jan 30 00:00:00 UTC 2010in 0.0 seconds.
17040
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17041
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17042
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17043
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17044
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.month", :unique=>false, :name=>"109_97_1_0"}])
17045
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.month", :unique=>false, :name=>"109_111_1_0"}])
17046
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.month", :unique=>false, :name=>"109_111"}])
17047
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17048
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_manufacture_date.month", "map"=>" function(){emit({month:(this._id.month)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{"_id.manufacture_date"=>{"$gte"=>"2009-12-01", "$lt"=>"2010-01-01"}}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17049
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154892_787", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17050
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154892_787.find({}, {})
17051
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17052
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154892_787"}, {}).limit(-1)
17053
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17054
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17055
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17056
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17057
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17058
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17059
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
17060
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17061
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
17062
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17063
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
17064
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17065
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date.month"}, {}).limit(-1)
17066
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17067
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c00005d, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17068
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068cff8406264c00005e, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17069
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068cff8406264c00005f, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17070
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c000060, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17071
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068cff8406264c000061, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17072
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17073
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154892000)) ? ((new Date(1270154892000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154892000)) ? ((new Date(1270154892000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17074
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154892_788", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17075
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154892_788.find({}, {})
17076
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17077
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154892_788"}, {}).limit(-1)
17078
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17079
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17080
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17081
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17082
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17083
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17084
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c000062, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17085
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068cff8406264c000063, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17086
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068cff8406264c000064, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17087
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c000065, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17088
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068cff8406264c000066, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17089
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17090
+ Processing DefectCubicle @ Thu Apr 01 13:48:12 -0700 2010
17091
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17092
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17093
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17094
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154892000)) ? ((new Date(1270154892000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154892000)) ? ((new Date(1270154892000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17095
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17096
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
17097
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
17098
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17099
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
17100
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
17101
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
17102
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
17103
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
17104
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17105
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17106
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17107
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17108
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
17109
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
17110
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
17111
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
17112
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.027002 seconds
17113
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17114
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17115
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17116
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17117
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
17118
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
17119
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
17120
+ DefectCubicle aggregation [:month, :region] processed in 0.024003 seconds
17121
+ DefectCubicle processed @ Thu Apr 01 13:48:12 -0700 2010in 0.111011 seconds.
17122
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17123
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17124
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17125
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17126
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114_1_0"}])
17127
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114"}])
17128
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17129
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
17130
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17131
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17132
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17133
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17134
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17135
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17136
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
17137
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17138
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
17139
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17140
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
17141
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17142
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
17143
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17144
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c000067, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17145
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068cff8406264c000068, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17146
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068cff8406264c000069, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17147
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c00006a, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17148
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068cff8406264c00006b, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17149
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17150
+ Processing DefectCubicle @ Thu Apr 01 13:48:12 -0700 2010
17151
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17152
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17153
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17154
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154892000)) ? ((new Date(1270154892000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154892000)) ? ((new Date(1270154892000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17155
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17156
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
17157
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
17158
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17159
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
17160
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
17161
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
17162
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
17163
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
17164
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17165
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17166
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17167
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17168
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
17169
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
17170
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
17171
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
17172
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.021002 seconds
17173
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17174
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17175
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17176
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17177
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
17178
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
17179
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
17180
+ DefectCubicle aggregation [:month, :region] processed in 0.021002 seconds
17181
+ DefectCubicle processed @ Thu Apr 01 13:48:12 -0700 2010in 0.072007 seconds.
17182
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17183
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17184
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17185
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17186
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :unique=>false, :name=>"109_97_1_0"}])
17187
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date", :unique=>false, :name=>"109_97"}])
17188
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17189
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_manufacture_date", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17190
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154892_797", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17191
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154892_797.find({}, {})
17192
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17193
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154892_797"}, {}).limit(-1)
17194
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17195
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17196
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17197
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17198
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17199
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17200
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
17201
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17202
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
17203
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17204
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
17205
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17206
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date"}, {}).limit(-1)
17207
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17208
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c00006c, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17209
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068cff8406264c00006d, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17210
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068cff8406264c00006e, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17211
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068cff8406264c00006f, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17212
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068cff8406264c000070, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17213
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17214
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154892000)) ? ((new Date(1270154892000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154892000)) ? ((new Date(1270154892000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{"$where"=>"((this.manufacture_date.substring(0,7)))=='2010-01'"}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17215
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154892_798", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17216
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154892_798.find({}, {})
17217
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17218
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154892_798"}, {}).limit(-1)
17219
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17220
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17221
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17222
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17223
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17224
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17225
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c000071, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17226
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068dff8406264c000072, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17227
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068dff8406264c000073, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17228
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c000074, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17229
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068dff8406264c000075, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17230
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17231
+ Processing DefectCubicle @ Thu Apr 01 13:48:13 -0700 2010
17232
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17233
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17234
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17235
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17236
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17237
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
17238
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
17239
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17240
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
17241
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
17242
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
17243
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
17244
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
17245
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17246
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17247
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17248
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17249
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
17250
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
17251
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
17252
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
17253
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.059006 seconds
17254
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17255
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17256
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17257
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17258
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
17259
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
17260
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
17261
+ DefectCubicle aggregation [:month, :region] processed in 0.024003 seconds
17262
+ DefectCubicle processed @ Thu Apr 01 13:48:13 -0700 2010in 0.112011 seconds.
17263
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17264
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17265
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17266
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17267
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114_1_0"}])
17268
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114"}])
17269
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17270
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({"_id.product"=>"Sad Day Moonshine"}, {})
17271
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17272
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17273
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17274
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17275
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17276
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17277
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
17278
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17279
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
17280
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17281
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
17282
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17283
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
17284
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17285
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c000076, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17286
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068dff8406264c000077, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17287
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068dff8406264c000078, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17288
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c000079, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17289
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068dff8406264c00007a, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17290
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17291
+ Processing DefectCubicle @ Thu Apr 01 13:48:13 -0700 2010
17292
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17293
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17294
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17295
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17296
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17297
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
17298
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
17299
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17300
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
17301
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
17302
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
17303
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
17304
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
17305
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17306
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17307
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17308
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17309
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
17310
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
17311
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
17312
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
17313
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.022002 seconds
17314
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17315
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17316
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17317
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17318
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
17319
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
17320
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
17321
+ DefectCubicle aggregation [:month, :region] processed in 0.022002 seconds
17322
+ DefectCubicle processed @ Thu Apr 01 13:48:13 -0700 2010in 0.072007 seconds.
17323
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17324
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17325
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17326
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17327
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114_1_0"}])
17328
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114"}])
17329
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17330
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({"$where"=>"this._id.product=='Sad Day Moonshine'"}, {})
17331
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17332
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17333
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17334
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17335
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17336
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17337
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
17338
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17339
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
17340
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17341
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
17342
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17343
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
17344
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17345
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c00007b, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17346
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068dff8406264c00007c, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17347
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068dff8406264c00007d, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17348
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c00007e, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17349
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068dff8406264c00007f, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17350
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17351
+ Processing DefectCubicle @ Thu Apr 01 13:48:13 -0700 2010
17352
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17353
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17354
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17355
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17356
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17357
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
17358
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
17359
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17360
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
17361
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
17362
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
17363
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
17364
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
17365
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17366
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17367
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17368
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17369
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
17370
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
17371
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
17372
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
17373
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.020002 seconds
17374
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17375
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17376
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17377
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17378
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
17379
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
17380
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
17381
+ DefectCubicle aggregation [:month, :region] processed in 0.022002 seconds
17382
+ DefectCubicle processed @ Thu Apr 01 13:48:13 -0700 2010in 0.070007 seconds.
17383
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17384
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17385
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17386
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17387
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.manufacture_date", :unique=>false, :name=>"109_97_1_0"}])
17388
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.manufacture_date", :unique=>false, :name=>"109_97_1_0"}])
17389
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_manufacture_date.manufacture_date", :unique=>false, :name=>"109_97"}])
17390
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17391
+ MONGODB cubicle_test.$cmd.find({"mapreduce"=>"defect_cubicles_cubicle_aggregation_manufacture_date.manufacture_date", "map"=>" function(){emit({manufacture_date:(this._id.manufacture_date)},{total_defects:(this.value.total_defects), preventable_defects:(this.value.preventable_defects), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{"_id.manufacture_date"=>"2009-12-09"}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17392
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154893_811", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17393
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154893_811.find({}, {})
17394
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17395
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154893_811"}, {}).limit(-1)
17396
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17397
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17398
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17399
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17400
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17401
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17402
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
17403
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17404
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
17405
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17406
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
17407
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17408
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_manufacture_date.manufacture_date"}, {}).limit(-1)
17409
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17410
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c000080, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17411
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068dff8406264c000081, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17412
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068dff8406264c000082, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17413
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c000083, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17414
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068dff8406264c000084, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17415
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17416
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{"product.name"=>"Sad Day Moonshine"}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17417
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154893_812", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17418
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154893_812.find({}, {})
17419
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17420
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154893_812"}, {}).limit(-1)
17421
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17422
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17423
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17424
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17425
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17426
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17427
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c000085, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17428
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068dff8406264c000086, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17429
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068dff8406264c000087, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17430
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c000088, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17431
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068dff8406264c000089, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17432
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17433
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{"$where"=>"this.product.name=='Sad Day Moonshine'"}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17434
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154893_813", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17435
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154893_813.find({}, {})
17436
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17437
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154893_813"}, {}).limit(-1)
17438
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17439
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17440
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17441
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17442
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17443
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17444
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c00008a, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17445
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068dff8406264c00008b, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17446
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068dff8406264c00008c, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17447
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c00008d, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17448
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068dff8406264c00008e, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17449
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17450
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{"manufacture_date"=>"2009-12-09"}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17451
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154893_814", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17452
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154893_814.find({}, {})
17453
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17454
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154893_814"}, {}).limit(-1)
17455
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17456
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17457
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17458
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17459
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17460
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17461
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c00008f, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17462
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068dff8406264c000090, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17463
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068dff8406264c000091, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17464
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068dff8406264c000092, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17465
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068dff8406264c000093, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17466
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17467
+ Processing DefectCubicle @ Thu Apr 01 13:48:13 -0700 2010
17468
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17469
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17470
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17471
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154893000)) ? ((new Date(1270154893000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17472
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17473
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
17474
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
17475
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17476
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
17477
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
17478
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
17479
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
17480
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
17481
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17482
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17483
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17484
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17485
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
17486
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
17487
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
17488
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
17489
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.032004 seconds
17490
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17491
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17492
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17493
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17494
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
17495
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
17496
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
17497
+ DefectCubicle aggregation [:month, :region] processed in 0.028002 seconds
17498
+ DefectCubicle processed @ Thu Apr 01 13:48:13 -0700 2010in 0.091009 seconds.
17499
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17500
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17501
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17502
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17503
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114_1_0"}])
17504
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114"}])
17505
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17506
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
17507
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17508
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17509
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17510
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17511
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17512
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17513
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
17514
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17515
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
17516
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17517
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
17518
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17519
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
17520
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17521
+ MONGODB db.defects.insert([{:cost=>0.78, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068eff8406264c000094, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17522
+ MONGODB db.defects.insert([{:cost=>0.02, :operator=>"Seymour", :manufacture_time=>Tue Jan 05 00:00:00 UTC 2010, :root_cause=>:operator_error, :_id=>4bb5068eff8406264c000095, :plant=>{:address=>{:location=>"Des Moines, Ia", :region=>"Midwest"}, :name=>"Plant2"}, :product=>{:category=>"Baking", :name=>"Evil's Pickling Spice"}, :defect_id=>"2", :outcome=>"Discarded", :manufacture_date=>"2010-01-05"}])
17523
+ MONGODB db.defects.insert([{:cost=>2.94, :operator=>"Zooey", :manufacture_time=>Mon Feb 01 00:00:00 UTC 2010, :root_cause=>:poor_judgment, :_id=>4bb5068eff8406264c000096, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"3", :outcome=>"Consumed", :manufacture_date=>"2010-02-01"}])
17524
+ MONGODB db.defects.insert([{:cost=>0.43, :operator=>"Buddy", :manufacture_time=>Wed Dec 09 00:00:00 UTC 2009, :root_cause=>:act_of_god, :_id=>4bb5068eff8406264c000097, :plant=>{:address=>{:location=>"Burmingham, Al", :region=>"South"}, :name=>"Plant19"}, :product=>{:category=>"Fireworks", :name=>"Brush Fire Bottle Rockets"}, :defect_id=>"4", :outcome=>"Repaired", :manufacture_date=>"2009-12-09"}])
17525
+ MONGODB db.defects.insert([{:cost=>12.19, :operator=>"Franny", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:defective_materials, :_id=>4bb5068eff8406264c000098, :plant=>{:address=>{:location=>"Oakland, Ca", :region=>"West"}, :name=>"Plant3"}, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :defect_id=>"5", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17526
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17527
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154894000)) ? ((new Date(1270154894000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154894000)) ? ((new Date(1270154894000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17528
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154894_819", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17529
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154894_819.find({}, {})
17530
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17531
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154894_819"}, {}).limit(-1)
17532
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17533
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17534
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17535
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17536
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17537
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17538
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17539
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17540
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17541
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17542
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17543
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17544
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17545
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17546
+ MONGODB db.defects.insert([{:ms1=>Sat Jan 01 00:00:00 UTC 2000, :cost=>0.78, :operator=>"a", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068eff8406264c000099, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :ms2=>Sun Jan 02 00:00:00 UTC 2000, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :ms3=>Tue Jan 04 00:00:00 UTC 2000, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17547
+ MONGODB db.defects.insert([{:ms1=>Sat Jan 01 00:00:00 UTC 2000, :cost=>0.78, :operator=>"b", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068eff8406264c00009a, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :ms2=>Mon Jan 03 00:00:00 UTC 2000, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :ms3=>Wed Jan 05 00:00:00 UTC 2000, :defect_id=>"2", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17548
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17549
+ Processing DefectCubicle @ Mon Jan 10 00:00:00 UTC 2000
17550
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17551
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17552
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17553
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(947462400000)) ? ((new Date(947462400000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(947462400000)) ? ((new Date(947462400000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17554
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17555
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
17556
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
17557
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17558
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
17559
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
17560
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
17561
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
17562
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
17563
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17564
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17565
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17566
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17567
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
17568
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
17569
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
17570
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
17571
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.0 seconds
17572
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17573
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17574
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17575
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17576
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
17577
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
17578
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
17579
+ DefectCubicle aggregation [:month, :region] processed in 0.0 seconds
17580
+ DefectCubicle processed @ Mon Jan 10 00:00:00 UTC 2000in 0.0 seconds.
17581
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17582
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17583
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17584
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17585
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114_1_0"}])
17586
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114"}])
17587
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17588
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
17589
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17590
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17591
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17592
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17593
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17594
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17595
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
17596
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17597
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
17598
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17599
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
17600
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17601
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
17602
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17603
+ MONGODB db.defects.insert([{:ms1=>Sat Jan 01 00:00:00 UTC 2000, :cost=>0.78, :operator=>"a", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068eff8406264c00009b, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :ms2=>Sun Jan 02 00:00:00 UTC 2000, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :ms3=>Tue Jan 04 00:00:00 UTC 2000, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17604
+ MONGODB db.defects.insert([{:ms1=>Sat Jan 01 00:00:00 UTC 2000, :cost=>0.78, :operator=>"b", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068eff8406264c00009c, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :ms2=>Mon Jan 03 00:00:00 UTC 2000, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :ms3=>Wed Jan 05 00:00:00 UTC 2000, :defect_id=>"2", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17605
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17606
+ Processing DefectCubicle @ Mon Jan 10 00:00:00 UTC 2000
17607
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17608
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17609
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17610
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(947462400000)) ? ((new Date(947462400000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(947462400000)) ? ((new Date(947462400000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17611
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17612
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
17613
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
17614
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17615
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
17616
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
17617
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
17618
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
17619
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
17620
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17621
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17622
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17623
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17624
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
17625
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
17626
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
17627
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
17628
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.0 seconds
17629
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17630
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17631
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17632
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17633
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
17634
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
17635
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
17636
+ DefectCubicle aggregation [:month, :region] processed in 0.0 seconds
17637
+ DefectCubicle processed @ Mon Jan 10 00:00:00 UTC 2000in 0.0 seconds.
17638
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17639
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17640
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17641
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17642
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114_1_0"}])
17643
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114"}])
17644
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17645
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
17646
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17647
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17648
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17649
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17650
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17651
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17652
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
17653
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17654
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
17655
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17656
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
17657
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17658
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
17659
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17660
+ MONGODB db.defects.insert([{:ms1=>Sat Jan 01 00:00:00 UTC 2000, :cost=>0.78, :operator=>"a", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068eff8406264c00009d, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :ms2=>Sun Jan 02 00:00:00 UTC 2000, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :ms3=>Tue Jan 04 00:00:00 UTC 2000, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17661
+ MONGODB db.defects.insert([{:ms1=>Sat Jan 01 00:00:00 UTC 2000, :cost=>0.78, :operator=>"b", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068eff8406264c00009e, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :ms2=>Mon Jan 03 00:00:00 UTC 2000, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :ms3=>Wed Jan 05 00:00:00 UTC 2000, :defect_id=>"2", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17662
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17663
+ Processing DefectCubicle @ Thu Apr 01 13:48:14 -0700 2010
17664
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17665
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17666
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17667
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154894000)) ? ((new Date(1270154894000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154894000)) ? ((new Date(1270154894000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17668
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17669
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
17670
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
17671
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17672
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
17673
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
17674
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
17675
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
17676
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
17677
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17678
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17679
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17680
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17681
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
17682
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
17683
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
17684
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
17685
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.020002 seconds
17686
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17687
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17688
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17689
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17690
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
17691
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
17692
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
17693
+ DefectCubicle aggregation [:month, :region] processed in 0.026003 seconds
17694
+ DefectCubicle processed @ Thu Apr 01 13:48:14 -0700 2010in 0.074008 seconds.
17695
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17696
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17697
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17698
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17699
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114_1_0"}])
17700
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114"}])
17701
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17702
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
17703
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17704
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17705
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17706
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17707
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17708
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17709
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
17710
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17711
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
17712
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17713
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
17714
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17715
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
17716
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17717
+ MONGODB db.defects.insert([{:ms1=>Sat Jan 01 00:00:00 UTC 2000, :cost=>0.78, :operator=>"a", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068eff8406264c00009f, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :ms2=>Sun Jan 02 00:00:00 UTC 2000, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :ms3=>Tue Jan 04 00:00:00 UTC 2000, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17718
+ MONGODB db.defects.insert([{:ms1=>Sat Jan 01 00:00:00 UTC 2000, :cost=>0.78, :operator=>"b", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068eff8406264c0000a0, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :ms2=>Mon Jan 03 00:00:00 UTC 2000, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :ms3=>Wed Jan 05 00:00:00 UTC 2000, :defect_id=>"2", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17719
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17720
+ Processing DefectCubicle @ Thu Apr 01 13:48:14 -0700 2010
17721
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17722
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17723
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17724
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154894000)) ? ((new Date(1270154894000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154894000)) ? ((new Date(1270154894000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17725
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17726
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
17727
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
17728
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17729
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
17730
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
17731
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
17732
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
17733
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
17734
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17735
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17736
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17737
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17738
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
17739
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
17740
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
17741
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
17742
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.020002 seconds
17743
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17744
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17745
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17746
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17747
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
17748
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
17749
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
17750
+ DefectCubicle aggregation [:month, :region] processed in 0.023003 seconds
17751
+ DefectCubicle processed @ Thu Apr 01 13:48:14 -0700 2010in 0.102011 seconds.
17752
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17753
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17754
+ MONGODB cubicle_test.$cmd.find({"count"=>"tmp.mr.mapreduce_1270154894_835", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17755
+ MONGODB cubicle_test.tmp.mr.mapreduce_1270154894_835.find({}, {})
17756
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17757
+ MONGODB cubicle_test.$cmd.find({:drop=>"tmp.mr.mapreduce_1270154894_835"}, {}).limit(-1)
17758
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17759
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17760
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17761
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17762
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17763
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17764
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
17765
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17766
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
17767
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17768
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
17769
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17770
+ MONGODB db.defects.insert([{:ms1=>Sat Jan 01 00:00:00 UTC 2000, :cost=>0.78, :operator=>"a", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068eff8406264c0000a1, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :ms2=>Sun Jan 02 00:00:00 UTC 2000, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :ms3=>Tue Jan 04 00:00:00 UTC 2000, :defect_id=>"1", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17771
+ MONGODB db.defects.insert([{:ms1=>Sat Jan 01 00:00:00 UTC 2000, :cost=>0.78, :operator=>"b", :manufacture_time=>Fri Jan 01 00:00:00 UTC 2010, :root_cause=>:act_of_god, :_id=>4bb5068eff8406264c0000a2, :plant=>{:address=>{:location=>"San Francisco, Ca", :region=>"West"}, :name=>"Plant1"}, :ms2=>Mon Jan 03 00:00:00 UTC 2000, :product=>{:category=>"Alcohol", :name=>"Sad Day Moonshine"}, :ms3=>Wed Jan 05 00:00:00 UTC 2000, :defect_id=>"2", :outcome=>"Repaired", :manufacture_date=>"2010-01-01"}])
17772
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17773
+ Processing DefectCubicle @ Thu Apr 01 13:48:14 -0700 2010
17774
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17775
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17776
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17777
+ 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), conditioned_preventable:(this.root_cause != \"act_of_god\") ? ((((1.0)) ? 1 : 0)) : null, total_cost:this.cost, avg_cost:this.cost, avg_cost_count:((this.cost) ? 1 : 0), ms1_to_ms2_average:(this.ms1 && this.ms2) ? ((this.ms2-this.ms1)/1000.0) : null, ms1_to_ms2_average_count:(this.ms1 && this.ms2) ? (((((this.ms2-this.ms1)/1000.0)) ? 1 : 0)) : null, ms2_to_ms3_sum:(this.ms2 && this.ms3) ? ((this.ms3-this.ms2)/1000.0) : null, total_duration:(this.ms1 && this.ms3) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, total_duration_count:(this.ms1 && this.ms3) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, conditional_duration:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? ((this.ms3-this.ms1)/1000/60/60/24.0) : null, conditional_duration_count:(this.ms1 && this.ms3 && (this.defect_id != 2)) ? (((((this.ms3-this.ms1)/1000/60/60/24.0)) ? 1 : 0)) : null, ms3_to_now_average:(this.ms3 && new Date(1270154894000)) ? ((new Date(1270154894000)-this.ms3)/1000/60/60/24.0) : null, ms3_to_now_average_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null, avg_time_since_ms3:(this.ms3 && new Date(1270154894000)) ? ((new Date(1270154894000)-this.ms3)/1000/60/60/24.0) : null, avg_time_since_ms3_count:(this.ms3 && new Date(1270154888000)) ? (((((new Date(1270154888000)-this.ms3)/1000/60/60/24.0)) ? 1 : 0)) : null});}\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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17778
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17779
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_111_1_0"}])
17780
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"121_101_1_0"}])
17781
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_1_0"}])
17782
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"112_114_1_0"}])
17783
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"114_101_1_0"}])
17784
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>112, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_112_1_0"}])
17785
+ MONGODB db.system.indexes.insert([{:key=>{"111"=>117, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"111_117_1_0"}])
17786
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>97, "121"=>101, "112"=>114, "114"=>101, "111"=>117}, :ns=>"cubicle_test.defect_cubicles_cubicle", :unique=>false, :name=>"109_97_121_101_112_114_114_101_111_117"}])
17787
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17788
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17789
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17790
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17791
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_1_0"}])
17792
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"112_114_1_0"}])
17793
+ MONGODB db.system.indexes.insert([{:key=>{"121"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"121_101_1_0"}])
17794
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "112"=>114, "121"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.product.year", :unique=>false, :name=>"109_111_112_114_121_101"}])
17795
+ DefectCubicle aggregation [:month, :year, :product] processed in 0.020002 seconds
17796
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17797
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17798
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17799
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17800
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_1_0"}])
17801
+ MONGODB db.system.indexes.insert([{:key=>{"114"=>101, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"114_101_1_0"}])
17802
+ MONGODB db.system.indexes.insert([{:key=>{"109"=>111, "114"=>101}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_month.region", :unique=>false, :name=>"109_111_114_101"}])
17803
+ DefectCubicle aggregation [:month, :region] processed in 0.021002 seconds
17804
+ DefectCubicle processed @ Thu Apr 01 13:48:15 -0700 2010in 0.067006 seconds.
17805
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17806
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17807
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17808
+ 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), conditioned_preventable:(this.value.conditioned_preventable), 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), ms1_to_ms2_average:(this.value.ms1_to_ms2_average*this.value.ms1_to_ms2_average_count), ms1_to_ms2_average_count:(this.value.ms1_to_ms2_average_count), ms2_to_ms3_sum:(this.value.ms2_to_ms3_sum), total_duration:(this.value.total_duration*this.value.total_duration_count), total_duration_count:(this.value.total_duration_count), conditional_duration:(this.value.conditional_duration*this.value.conditional_duration_count), conditional_duration_count:(this.value.conditional_duration_count), ms3_to_now_average:(this.value.ms3_to_now_average*this.value.ms3_to_now_average_count), ms3_to_now_average_count:(this.value.ms3_to_now_average_count), avg_time_since_ms3:(this.value.avg_time_since_ms3*this.value.avg_time_since_ms3_count), avg_time_since_ms3_count:(this.value.avg_time_since_ms3_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] || doc[key] == 0){\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", "query"=>{}, "finalize"=>" function(key,value)\n {\n\n value.avg_cost=value.avg_cost/value.avg_cost_count;\nvalue.ms1_to_ms2_average=value.ms1_to_ms2_average/value.ms1_to_ms2_average_count;\nvalue.total_duration=value.total_duration/value.total_duration_count;\nvalue.conditional_duration=value.conditional_duration/value.conditional_duration_count;\nvalue.ms3_to_now_average=value.ms3_to_now_average/value.ms3_to_now_average_count;\nvalue.avg_time_since_ms3=value.avg_time_since_ms3/value.avg_time_since_ms3_count;\n value.preventable_pct=((value.total_defects > 0 && value.preventable_defects ? value.preventable_defects/value.total_defects : 0));\n return value;\n }\n"}, {}).limit(-1)
17809
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114, "1"=>0}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114_1_0"}])
17810
+ MONGODB db.system.indexes.insert([{:key=>{"112"=>114}, :ns=>"cubicle_test.defect_cubicles_cubicle_aggregation_product", :unique=>false, :name=>"112_114"}])
17811
+ MONGODB cubicle_test.$cmd.find({"count"=>"defect_cubicles_cubicle_aggregation_product", "query"=>{}, "fields"=>nil}, {}).limit(-1)
17812
+ MONGODB cubicle_test.defect_cubicles_cubicle_aggregation_product.find({}, {})
17813
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17814
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17815
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17816
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17817
+ MONGODB cubicle_test.$cmd.find({:drop=>"defects"}, {}).limit(-1)
17818
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17819
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle"}, {}).limit(-1)
17820
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17821
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.product.year"}, {}).limit(-1)
17822
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17823
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_month.region"}, {}).limit(-1)
17824
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17825
+ MONGODB cubicle_test.$cmd.find({:drop=>"defect_cubicles_cubicle_aggregation_product"}, {}).limit(-1)
17826
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17827
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17828
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17829
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17830
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17831
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17832
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17833
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17834
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17835
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17836
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17837
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17838
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17839
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17840
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17841
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17842
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17843
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17844
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17845
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17846
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17847
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17848
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17849
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17850
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17851
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17852
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17853
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17854
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17855
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17856
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17857
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17858
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17859
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17860
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17861
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17862
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17863
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17864
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17865
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17866
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17867
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17868
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17869
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17870
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17871
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17872
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17873
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17874
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17875
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17876
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17877
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17878
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17879
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17880
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17881
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17882
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17883
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17884
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17885
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17886
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17887
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17888
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17889
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)
17890
+ MONGODB admin.$cmd.find({:ismaster=>1}, {}).limit(-1)
17891
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17892
+ MONGODB cubicle_test.system.namespaces.find({}, {})
17893
+ MONGODB cubicle_test.$cmd.find({:drop=>"system.indexes"}, {}).limit(-1)