org.apache.hadoop.mapred.lib
Class IdentityMapper<K,V>
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
org.apache.hadoop.mapred.lib.IdentityMapper<K,V>
- All Implemented Interfaces:
- Closeable, JobConfigurable, Mapper<K,V,K,V>
@InterfaceAudience.Public
@InterfaceStability.Stable
public class IdentityMapper<K,V>
- extends MapReduceBase
- implements Mapper<K,V,K,V>
Implements the identity function, mapping inputs directly to outputs.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdentityMapper
public IdentityMapper()
map
public void map(K key,
V val,
OutputCollector<K,V> output,
Reporter reporter)
throws IOException
- The identify function. Input key/value pair is written directly to
output.
- Specified by:
map
in interface Mapper<K,V,K,V>
- Parameters:
key
- the input key.val
- the input value.output
- collects mapped keys and values.reporter
- facility to report progress.
- Throws:
IOException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.