[Solved] Aggregation in MapReduce [closed]


This is a bit broad for an SO question but I’ll bite.

Your mapper is for mapping values to keys. Lets say your CSV has 4 columns with numeric values:

42, 71, 45, 22

You map a key to each value; effectively what would be like the header in the CSV. Lets say column 4 represented “Number of widgets”. You’d map “number_of_widgets” as the key to the value of column 4 in your mapper.

The reducer is going to get all the values for a given key. That’s where you figure out your min/max. You just iterate though all the values for the key and keep track of the min and max.

7

solved Aggregation in MapReduce [closed]