public static class WordMedian.WordMedianReducer
extends org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable>
Constructor and Description |
---|
WordMedian.WordMedianReducer() |
Modifier and Type | Method and Description |
---|---|
void |
reduce(org.apache.hadoop.io.IntWritable key,
Iterable<org.apache.hadoop.io.IntWritable> 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.IntWritable key, Iterable<org.apache.hadoop.io.IntWritable> values, org.apache.hadoop.mapreduce.Reducer.Context context) throws IOException, InterruptedException
reduce
in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.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 © 2017 Apache Software Foundation. All Rights Reserved.