org.apache.hadoop.mapred.lib.aggregate
Class ValueAggregatorCombiner<K1 extends WritableComparable,V1 extends Writable>
java.lang.Object
org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJobBase<K1,V1>
org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorCombiner<K1,V1>
- All Implemented Interfaces:
- Closeable, JobConfigurable, Mapper<K1,V1,Text,Text>, Reducer<Text,Text,Text,Text>
@InterfaceAudience.Public
@InterfaceStability.Stable
public class ValueAggregatorCombiner<K1 extends WritableComparable,V1 extends Writable>
- extends ValueAggregatorJobBase<K1,V1>
This class implements the generic combiner of Aggregate.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueAggregatorCombiner
public ValueAggregatorCombiner()
configure
public void configure(JobConf job)
- Combiner does not need to configure.
- Specified by:
configure
in interface JobConfigurable
- Overrides:
configure
in class ValueAggregatorJobBase<K1 extends WritableComparable,V1 extends Writable>
- Parameters:
job
- the configuration
reduce
public void reduce(Text key,
Iterator<Text> values,
OutputCollector<Text,Text> output,
Reporter reporter)
throws IOException
- Combines values for a given key.
- 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 combineoutput
- to collect combined valuesreporter
- facility to report progress.
- Throws:
IOException
close
public void close()
throws IOException
- Do nothing.
- Specified by:
close
in interface Closeable
- Overrides:
close
in class ValueAggregatorJobBase<K1 extends WritableComparable,V1 extends Writable>
- Throws:
IOException
map
public void map(K1 arg0,
V1 arg1,
OutputCollector<Text,Text> arg2,
Reporter arg3)
throws IOException
- Do nothing. Should not be called.
- Parameters:
arg0
- the input key.arg1
- the input value.arg2
- collects mapped keys and values.arg3
- facility to report progress.
- Throws:
IOException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.