public static class WordMean.WordMeanReducer extends org.apache.hadoop.mapreduce.Reducer<Text,LongWritable,Text,LongWritable>
org.apache.hadoop.mapreduce.Reducer.Context| Constructor and Description |
|---|
WordMeanReducer() |
| Modifier and Type | Method and Description |
|---|---|
void |
reduce(Text key,
Iterable<LongWritable> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
Sums all the individual values within the iterator and writes them to the
same key.
|
cleanup, run, setuppublic void reduce(Text key, Iterable<LongWritable> values, org.apache.hadoop.mapreduce.Reducer.Context context) throws IOException, InterruptedException
reduce in class org.apache.hadoop.mapreduce.Reducer<Text,LongWritable,Text,LongWritable>key - This will be one of 2 constants: LENGTH_STR or COUNT_STR.values - This will be an iterator of all the values associated with that
key.IOExceptionInterruptedExceptionCopyright © 2018 CERN. All Rights Reserved.