org.apache.hadoop.mapred.lib
Class IdentityReducer

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.hadoop.mapred.lib.IdentityReducer
All Implemented Interfaces:
Closeable, JobConfigurable, Reducer

public class IdentityReducer
extends MapReduceBase
implements Reducer

Performs no reduction, writing all input values directly to the output.


Constructor Summary
IdentityReducer()
           
 
Method Summary
 void reduce(WritableComparable key, Iterator values, OutputCollector output, Reporter reporter)
          Writes all keys and values directly to output.
 
Methods inherited from class org.apache.hadoop.mapred.MapReduceBase
close, configure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.mapred.JobConfigurable
configure
 
Methods inherited from interface org.apache.hadoop.io.Closeable
close
 

Constructor Detail

IdentityReducer

public IdentityReducer()
Method Detail

reduce

public void reduce(WritableComparable key,
                   Iterator values,
                   OutputCollector output,
                   Reporter reporter)
            throws IOException
Writes all keys and values directly to output.

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