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