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.


Method Summary
 void reduce(WritableComparable key, Iterator values, OutputCollector output, Reporter reporter)
          Combines values for a given key.
 
Methods inherited from interface org.apache.hadoop.mapred.JobConfigurable
configure
 
Methods inherited from interface org.apache.hadoop.io.Closeable
close
 

Method Detail

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 key
values - the values to combine
output - to collect combined values
Throws:
IOException


Copyright © 2006 The Apache Software Foundation