[SERVER-2409] Error attempting to use "reduce" MapReduce Output Mode Created: 25/Jan/11 Updated: 12/Jul/16 Resolved: 26/Jan/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.7.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Brendan W. McAdams | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
1.7.4, 64 bit Mac OS X with Durability enabled |
||
| Attachments: |
|
| Operating System: | ALL |
| Participants: |
| Description |
|
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 } } } } } } } } } } } } 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" , ) }" , for ( var i = 0; i < values.length; i++ ) { n.sum += values[i].sum; n.count += values[i].count; } return n; } |
| Comments |
| Comment by Brendan W. McAdams [ 25/Jan/11 ] |
|
Works against MASTER, no error reported. |
| Comment by Eliot Horowitz (Inactive) [ 25/Jan/11 ] |
|
Can you try with HEAD |
| Comment by Brendan W. McAdams [ 25/Jan/11 ] |
|
Attached a test JS file and the source data I was using. It looks like the issue may be trying to reduce into a collection which doesn't already exist. |
| Comment by Brendan W. McAdams [ 25/Jan/11 ] |
|
These JavaScript files can be used to reproduce the issue. Import yield_historical_in.json into a collection named 'yield_historical.in' And then run the attached .js file against the mongo shell. Merging into a non-existent collection works. Reducing into an existing collection works. Reducing into a NON existing collection fails. |
| Comment by Eliot Horowitz (Inactive) [ 25/Jan/11 ] |
|
you should make a .js file that reproduces this |