org.apache.hadoop.mapred.lib.aggregate
Class ValueAggregatorCombiner<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.ValueAggregatorCombiner<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 ValueAggregatorCombiner<K1 extends org.apache.hadoop.io.WritableComparable,V1 extends org.apache.hadoop.io.Writable>
- extends ValueAggregatorJobBase<K1,V1>
This class implements the generic combiner of Aggregate.
Method Summary |
void |
close()
Do nothing. |
void |
configure(JobConf job)
Combiner does not need to configure. |
void |
map(K1 arg0,
V1 arg1,
OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> arg2,
Reporter arg3)
Do nothing. |
void |
reduce(org.apache.hadoop.io.Text key,
Iterator<org.apache.hadoop.io.Text> values,
OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> output,
Reporter reporter)
Combines values for a given key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueAggregatorCombiner
public ValueAggregatorCombiner()
configure
public void configure(JobConf job)
- Combiner does not need to configure.
- Specified by:
configure
in interface JobConfigurable
- Overrides:
configure
in class ValueAggregatorJobBase<K1 extends org.apache.hadoop.io.WritableComparable,V1 extends org.apache.hadoop.io.Writable>
- Parameters:
job
- the configuration
reduce
public void reduce(org.apache.hadoop.io.Text key,
Iterator<org.apache.hadoop.io.Text> values,
OutputCollector<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> output,
Reporter reporter)
throws IOException
- Combines values for a given key.
- Parameters:
key
- the key is expected to be a Text object, whose prefix indicates
the type of aggregation to aggregate the values.values
- the values to combineoutput
- to collect combined valuesreporter
- facility to report progress.
- Throws:
IOException
close
public void close()
throws IOException
- Do nothing.
- Specified by:
close
in interface Closeable
- Overrides:
close
in class ValueAggregatorJobBase<K1 extends org.apache.hadoop.io.WritableComparable,V1 extends org.apache.hadoop.io.Writable>
- Throws:
IOException
map
public void map(K1 arg0,
V1 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 input key.arg1
- the input value.arg2
- collects mapped keys and values.arg3
- facility to report progress.
- Throws:
IOException
Copyright © 2013 Apache Software Foundation. All Rights Reserved.