net.nutch.mapReduce
Interface Reducer

All Known Implementing Classes:
DefaultReducer

public interface Reducer

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)
          Combines values for a given key.
 

Method Detail

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


Copyright © 2005 The Nutch Organization.