org.apache.hadoop.mapred.lib.aggregate
Class ValueAggregatorMapper<K1 extends org.apache.hadoop.io.WritableComparable,V1 extends org.apache.hadoop.io.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,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>, Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
@InterfaceAudience.Public
@InterfaceStability.Stable
public class ValueAggregatorMapper<K1 extends org.apache.hadoop.io.WritableComparable,V1 extends org.apache.hadoop.io.Writable>
- extends ValueAggregatorJobBase<K1,V1>
This class implements the generic mapper of Aggregate.
Method Summary |
void |
map(K1 key,
V1 value,
OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> output,
Reporter reporter)
the map function. |
void |
reduce(org.apache.hadoop.io.Text arg0,
Iterator<org.apache.hadoop.io.Text> arg1,
OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> arg2,
Reporter arg3)
Do nothing. |
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<org.apache.hadoop.io.Text,org.apache.hadoop.io.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(org.apache.hadoop.io.Text arg0,
Iterator<org.apache.hadoop.io.Text> arg1,
OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.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 © 2012 Apache Software Foundation. All Rights Reserved.