org.apache.hadoop.mapred
Interface Reducer
- All Superinterfaces:
- Closeable, JobConfigurable
- All Known Implementing Classes:
- DataJoinMapperBase, DataJoinReducerBase, FieldSelectionMapReduce, IdentityReducer, JobBase, LongSumReducer, PiEstimator.PiReducer, PipeReducer, ValueAggregatorCombiner, ValueAggregatorJobBase, ValueAggregatorMapper, ValueAggregatorReducer, WordCount.Reduce
public interface Reducer
- extends JobConfigurable, Closeable
Reduces a set of intermediate values which share a key to a smaller set of
values. Input values are the grouped output of a Mapper
.
reduce
void reduce(WritableComparable key,
Iterator values,
OutputCollector output,
Reporter reporter)
throws IOException
- 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 keyvalues
- the values to combineoutput
- to collect combined values
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation