MapReduce extends the Lisp map and reduce in one significant respect: the map function produces not just one result, but a set of results, each of which has a key string.
When our function testforz found a z, it would output (1). But now, we will always produce a key as well, e.g. (z (1)). In Java, we would say:
mr.collect_map("z", list("1"));because the intermediate values are always strings.
There is an intermediate Sort process that groups the results for each key. Then reduce is applied to the results for each key, returning the key with the reduced answer for that key.
Contents    Page-10    Prev    Next    Page+10    Index