Recall: basic Map/Reduce
Tuesday, March 01, 2011
9:39 AM
Recall: 
The map step does something to each element in a bag. 
The combine step takes the output of several maps and produces one output from them (of the same type). 
The reduce step produces final output. 
In Pig
The map step acts on individual bag elements, and returns a Tuple. 
The combine step inputs a Tuple (of partial map results) and outputs a Tuple. (Sometimes, it just returns its input).
The  reduce step takes a Tuple as input and produces the desired output type (e.g., a Long). 