When I was doing MR, I wanted to write the results into a new set. In fact, I have done it before, but in my impression, it always seems that I can’t write it in.
//....more code
try {
cmd = new MapReduceCommand(
this.dbc, MapString,
ReduceString,
dbtemp,
MapReduceCommand.OutputType.REPLACE,
query);
cmd.setFinalize(Finalize);
output = this.dbc.mapReduce(cmd);
}
//...more code
The formal parameters of MapReduceCommand are as follows
public MapReduceCommand(com.mongodb.DBCollection inputCollection, java.lang.String map, java.lang.String reduce, java.lang.String outputCollection, com.mongodb.MapReduceCommand.OutputType type, com.mongodb.DBObject query) { /* compiled code */ }
I hope some of mongo’s friends will discuss it together.
Are we done yet? We have also encountered this problem.