org.apache.hadoop.mapreduce.lib.aggregate
Class ValueAggregatorMapper<K1 extends WritableComparable<?>,V1 extends Writable>
java.lang.Object
org.apache.hadoop.mapreduce.Mapper<K1,V1,Text,Text>
org.apache.hadoop.mapreduce.lib.aggregate.ValueAggregatorMapper<K1,V1>
@InterfaceAudience.Public
@InterfaceStability.Stable
public class ValueAggregatorMapper<K1 extends WritableComparable<?>,V1 extends Writable>
- extends Mapper<K1,V1,Text,Text>
This class implements the generic mapper of Aggregate.
Method Summary |
void |
map(K1 key,
V1 value,
org.apache.hadoop.mapreduce.Mapper.Context context)
the map function. |
void |
setup(org.apache.hadoop.mapreduce.Mapper.Context context)
Called once at the beginning of the task. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueAggregatorMapper
public ValueAggregatorMapper()
setup
public void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
- Description copied from class:
Mapper
- Called once at the beginning of the task.
- Overrides:
setup
in class Mapper<K1 extends WritableComparable<?>,V1 extends Writable,Text,Text>
- Throws:
IOException
InterruptedException
map
public void map(K1 key,
V1 value,
org.apache.hadoop.mapreduce.Mapper.Context context)
throws IOException,
InterruptedException
- the map function. It iterates through the value aggregator descriptor
list to generate aggregation id/value pairs and emit them.
- Overrides:
map
in class Mapper<K1 extends WritableComparable<?>,V1 extends Writable,Text,Text>
- Throws:
IOException
InterruptedException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.