org.apache.hadoop.mapreduce.lib.aggregate
Class ValueAggregatorCombiner<K1 extends WritableComparable<?>,V1 extends Writable>
java.lang.Object
org.apache.hadoop.mapreduce.Reducer<Text,Text,Text,Text>
org.apache.hadoop.mapreduce.lib.aggregate.ValueAggregatorCombiner<K1,V1>
@InterfaceAudience.Public
@InterfaceStability.Stable
public class ValueAggregatorCombiner<K1 extends WritableComparable<?>,V1 extends Writable>
- extends Reducer<Text,Text,Text,Text>
This class implements the generic combiner of Aggregate.
Method Summary |
void |
reduce(Text key,
Iterable<Text> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
Combines values for a given key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueAggregatorCombiner
public ValueAggregatorCombiner()
reduce
public void reduce(Text key,
Iterable<Text> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
throws IOException,
InterruptedException
- Combines values for a given key.
- Overrides:
reduce
in class Reducer<Text,Text,Text,Text>
- Parameters:
key
- the key is expected to be a Text object, whose prefix indicates
the type of aggregation to aggregate the values.values
- the values to combinecontext
- to collect combined values
- Throws:
IOException
InterruptedException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.