org.apache.hadoop.mapred.lib.aggregate
Class ValueAggregatorMapper<K1 extends WritableComparable,V1 extends Writable>
java.lang.Object
org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJobBase<K1,V1>
org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorMapper<K1,V1>
- All Implemented Interfaces:
- Closeable, JobConfigurable, Mapper<K1,V1,Text,Text>, Reducer<Text,Text,Text,Text>
@InterfaceAudience.Public
@InterfaceStability.Stable
public class ValueAggregatorMapper<K1 extends WritableComparable,V1 extends Writable>
- extends ValueAggregatorJobBase<K1,V1>
This class implements the generic mapper of Aggregate.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueAggregatorMapper
public ValueAggregatorMapper()
map
public void map(K1 key,
V1 value,
OutputCollector<Text,Text> output,
Reporter reporter)
throws IOException
- the map function. It iterates through the value aggregator descriptor
list to generate aggregation id/value pairs and emit them.
- Parameters:
key
- the input key.value
- the input value.output
- collects mapped keys and values.reporter
- facility to report progress.
- Throws:
IOException
reduce
public void reduce(Text arg0,
Iterator<Text> arg1,
OutputCollector<Text,Text> arg2,
Reporter arg3)
throws IOException
- Do nothing. Should not be called.
- Parameters:
arg0
- the key.arg1
- the list of values to reduce.arg2
- to collect keys and combined values.arg3
- facility to report progress.
- Throws:
IOException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.