Thursday, October 6, 2011

10/6/2011

Map Reduce is a useful way to breakdown tasks where a simple task needs to be applied to many many elements.

Map
  • Maps the elements to key value pairs [key, v]
Reduce
  • Performs some combination on the new key value pair, [key[v1,v2,v3...]].
For counting words, map would create a key value pair where the key could be the word and the value would be 1.
In the reduce stage, the 1's associated with each key would be counted.

-James Cotter