org.apache.nutch.mapReduce
Interface Reducer
- All Superinterfaces:
- Configurable
- All Known Implementing Classes:
- IdentityReducer, LongSumReducer
- public interface Reducer
- extends Configurable
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
public void reduce(WritableComparable key,
Iterator values,
OutputCollector output)
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