org.apache.hadoop.mapred.lib.aggregate
Class ValueAggregatorReducer
java.lang.Object
org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorJobBase
org.apache.hadoop.mapred.lib.aggregate.ValueAggregatorReducer
- All Implemented Interfaces:
- Closeable, JobConfigurable, Mapper, Reducer
public class ValueAggregatorReducer
- extends ValueAggregatorJobBase
This class implements the generic reducer of Abacus.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueAggregatorReducer
public ValueAggregatorReducer()
reduce
public void reduce(WritableComparable key,
Iterator values,
OutputCollector output,
Reporter reporter)
throws IOException
- Description copied from interface:
Reducer
- Combines values for a given key. Output values must be of the same type
as input values. Input keys must not be altered. Typically all values
are combined into zero or one value. Output pairs are collected with
calls to
OutputCollector.collect(WritableComparable,Writable)
.
- Parameters:
key
- the key is expected to be a Text object, whose prefix indicates
the type of aggregation to aggregate the values. In effect, data
driven computing is achieved. It is assumed that each aggregator's
getReport method emits appropriate output for the aggregator. This
may be further customiized.values
- the values to combineoutput
- to collect combined values
- Throws:
IOException
map
public void map(WritableComparable arg0,
Writable arg1,
OutputCollector arg2,
Reporter arg3)
throws IOException
- Do nothing. Should not be called
- Parameters:
arg0
- the keyarg1
- the valuesarg2
- collects mapped keys and values
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation