public static class WordMean.WordMeanReducer extends Reducer<Text,LongWritable,Text,LongWritable>
Reducer.Context
Constructor and Description |
---|
WordMean.WordMeanReducer() |
Modifier and Type | Method and Description |
---|---|
void |
reduce(Text key,
Iterable<LongWritable> values,
Reducer.Context context)
Sums all the individual values within the iterator and writes them to the
same key.
|
public void reduce(Text key, Iterable<LongWritable> values, Reducer.Context context) throws IOException, InterruptedException
reduce
in class 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.IOException
InterruptedException
Copyright © 2013 Apache Software Foundation. All rights reserved.