@InterfaceAudience.Public @InterfaceStability.Stable public class ValueAggregatorReducer<K1 extends WritableComparable<?>,V1 extends Writable> extends Reducer<Text,Text,Text,Text>
Constructor and Description |
---|
ValueAggregatorReducer() |
Modifier and Type | Method and Description |
---|---|
void |
reduce(Text key,
Iterable<Text> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
This method is called once for each key.
|
void |
setup(org.apache.hadoop.mapreduce.Reducer.Context context)
Called once at the start of the task.
|
public ValueAggregatorReducer()
public void setup(org.apache.hadoop.mapreduce.Reducer.Context context) throws IOException, InterruptedException
Reducer
setup
in class Reducer<Text,Text,Text,Text>
IOException
InterruptedException
public void reduce(Text key, Iterable<Text> values, org.apache.hadoop.mapreduce.Reducer.Context context) throws IOException, InterruptedException
Reducer
reduce
in class Reducer<Text,Text,Text,Text>
key
- the key is expected to be a Text object, whose prefix indicates
the type of aggregation to aggregate the values. In effect, data
driven computing is achieved. It is assumed that each aggregator's
getReport method emits appropriate output for the aggregator. This
may be further customized.values
- the values to be aggregatedcontext
- IOException
InterruptedException
Copyright © 2015 Apache Software Foundation. All rights reserved.