-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.7.4
-
Component/s: None
-
Labels:None
-
Environment:1.7.4, 64 bit Mac OS X with Durability enabled
-
ALL
I'm running a series of tests (See casbah-core/src/test/scala/MapReduceSpec.scala in Casbah for some of the test routines I'm running) and unable to successfully run a MapReduce with a 'reduce' output.
'merge' works fine.
I'm attempting to create a "final" map_reduce collection by having multiple MapReduce jobs on different identical datasets run with 'reduce' output.
The collections I'm reading from are 'yield_historical.out.nineties' and 'yield_historical.out.aughts'. They contain data like such:
{ "_id" : 100, "value" :
{ "count" : 231, "sum" : 1380.3799999999985 } }
{ "_id" : 101, "value" :
}
{ "_id" : 102, "value" :
}
{ "_id" : 103, "value" :
}
{ "_id" : 104, "value" :
}
{ "_id" : 105, "value" :
}
{ "_id" : 106, "value" :
}
{ "_id" : 107, "value" :
}
{ "_id" : 108, "value" :
}
{ "_id" : 109, "value" :
}
{ "_id" : 110, "value" :
}
These collections were produced by running a normal mapReduce job with the same Map and Reduce function.
When I attempt to run the job however, I get the error:
{ "assertion" : "Not an index cursor" , "assertionCode" : 9011 , "errmsg" : "db assertion failure" , "ok" : 0.0}The command being run is:
{ "mapreduce" : "yield_historical.out.aughts" ,
"map" : "function m() { emit( typeof(this._id) == \"number\" ? this._id : this._id.getYear(),
) }" ,
"reduce" : " function r( year, values ) {
var n =
for ( var i = 0; i < values.length; i++ )
{ n.sum += values[i].sum; n.count += values[i].count; } return n;
}",
"verbose" : true , "out" :
}