org.apache.hadoop.mapreduce.lib.aggregate
Class ValueAggregatorMapper<K1 extends org.apache.hadoop.io.WritableComparable<?>,V1 extends org.apache.hadoop.io.Writable>
java.lang.Object
org.apache.hadoop.mapreduce.Mapper<K1,V1,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
org.apache.hadoop.mapreduce.lib.aggregate.ValueAggregatorMapper<K1,V1>
@InterfaceAudience.Public
@InterfaceStability.Stable
public class ValueAggregatorMapper<K1 extends org.apache.hadoop.io.WritableComparable<?>,V1 extends org.apache.hadoop.io.Writable>
- extends Mapper<K1,V1,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
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()
setup
public void setup(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 org.apache.hadoop.io.WritableComparable<?>,V1 extends org.apache.hadoop.io.Writable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
- Throws:
IOException
InterruptedException
map
public void map(K1 key,
V1 value,
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 org.apache.hadoop.io.WritableComparable<?>,V1 extends org.apache.hadoop.io.Writable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
- Throws:
IOException
InterruptedException
Copyright © 2012 Apache Software Foundation. All Rights Reserved.