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>
@Public
@Stable
public class ValueAggregatorMapper<K1 extends WritableComparable<?>,V1 extends Writable>
extends Mapper<K1,V1,Text,Text>
This class implements the generic mapper of Aggregate.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ValueAggregatorMapper
public ValueAggregatorMapper()
-
-
Method Details
-
setup
public void setup(Mapper<K1, V1, throws IOException, InterruptedExceptionText, Text>.org.apache.hadoop.mapreduce.Mapper.Context context) Description copied from class:MapperCalled once at the beginning of the task.- Overrides:
setupin classMapper<K1 extends WritableComparable<?>,V1 extends Writable, Text, Text> - Throws:
IOExceptionInterruptedException
-
map
public void map(K1 key, V1 value, Mapper<K1, V1, throws IOException, InterruptedExceptionText, Text>.org.apache.hadoop.mapreduce.Mapper.Context context) the map function. It iterates through the value aggregator descriptor list to generate aggregation id/value pairs and emit them.- Overrides:
mapin classMapper<K1 extends WritableComparable<?>,V1 extends Writable, Text, Text> - Throws:
IOExceptionInterruptedException
-