org.apache.nutch.mapReduce.lib
Class LongSumReducer

java.lang.Object
  extended byorg.apache.nutch.mapReduce.lib.LongSumReducer
All Implemented Interfaces:
Configurable, Reducer

public class LongSumReducer
extends Object
implements Reducer

A Reducer that sums long values.


Constructor Summary
LongSumReducer()
           
 
Method Summary
 void configure(JobConf job)
          Initializes a new instance from a JobConf.
 void reduce(WritableComparable key, Iterator values, OutputCollector output)
          Combines values for a given key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongSumReducer

public LongSumReducer()
Method Detail

configure

public void configure(JobConf job)
Description copied from interface: Configurable
Initializes a new instance from a JobConf.

Specified by:
configure in interface Configurable
Parameters:
job - the configuration

reduce

public void reduce(WritableComparable key,
                   Iterator values,
                   OutputCollector output)
            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).

Specified by:
reduce in interface Reducer
Parameters:
key - the key
values - the values to combine
output - to collect combined values
Throws:
IOException


Copyright © 2006 The Apache Software Foundation