public static class WordMedian.WordMedianReducer extends Reducer<IntWritable,IntWritable,IntWritable,IntWritable>
Reducer.Context
Constructor and Description |
---|
WordMedian.WordMedianReducer() |
Modifier and Type | Method and Description |
---|---|
void |
reduce(IntWritable key,
Iterable<IntWritable> values,
Reducer.Context context)
Sums all the individual values within the iterator and writes them to the
same key.
|
public void reduce(IntWritable key, Iterable<IntWritable> values, Reducer.Context context) throws IOException, InterruptedException
reduce
in class Reducer<IntWritable,IntWritable,IntWritable,IntWritable>
key
- This will be a length of a word that was read.values
- This will be an iterator of all the values associated with that
key.IOException
InterruptedException
Copyright © 2013 Apache Software Foundation. All rights reserved.