1.

If the ______ field for mapReduce has the sharded value, MongoDB shards the output collection using the _id field as the shard key.(a) input(b) $in(c) $out(d) none of the mentionedI got this question in a job interview.I would like to ask this question from Map-Reduce and Sharded Collections topic in division Aggregation Concepts and Aggregation Mechanics of MongoDB

Answer»

Correct OPTION is (C) $out

For EXPLANATION I would say: During the post-processing, each shard will pull the results for its own CHUNKS from the other shards, run the final reduce/finalize, and write locally to the OUTPUT collection.



Discussion

No Comment Found

Related InterviewSolutions