MapReduce in MongoDB 1.8
Brendan W. McAdams has two posts — here and here — about the updates of MapReduce in MongoDB 1.8 and using Java and respectively Scala Casbah to working with MapReduce:
If you aren’t new to MongoDB MapReduce, the most important thing to note since MongoDB 1.6.x is that temporary collections are gone; it is now required to specify an output. Previously, if you omitted the out argument MongoDB would create a temporary collection and return its name with the job results; In non-sharded MongoDB setups these temporary collections would go out of scope and be cleaned up when the connection closed. Unfortunately, for sharded setups it wasn’t possible to safely clean these up — they would remain behind and clutter up the database. For this and other reasons the temporary collection feature was removed.
Basically instead of temporary collections, you have the option to “inline” results or “merge” or “reduce” these with a permanent collection.