org.apache.hadoop.mapred.lib
Class IdentityMapper

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

public class IdentityMapper
extends MapReduceBase
implements Mapper

Implements the identity function, mapping inputs directly to outputs.


Constructor Summary
IdentityMapper()
           
 
Method Summary
 void map(WritableComparable key, Writable val, OutputCollector output, Reporter reporter)
          The identify function.
 
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

IdentityMapper

public IdentityMapper()
Method Detail

map

public void map(WritableComparable key,
                Writable val,
                OutputCollector output,
                Reporter reporter)
         throws IOException
The identify function. Input key/value pair is written directly to output.

Specified by:
map in interface Mapper
Parameters:
key - the key
val - the values
output - collects mapped keys and values
Throws:
IOException


Copyright © 2006 The Apache Software Foundation