org.apache.hadoop.mapreduce.lib.map
Class InverseMapper<K,V>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<K,V,V,K>
      extended by org.apache.hadoop.mapreduce.lib.map.InverseMapper<K,V>

@InterfaceAudience.Public
@InterfaceStability.Stable
public class InverseMapper<K,V>
extends Mapper<K,V,V,K>

A Mapper that swaps keys and values.


Constructor Summary
InverseMapper()
           
 
Method Summary
 void map(K key, V value, org.apache.hadoop.mapreduce.Mapper.Context context)
          The inverse function.
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
cleanup, run, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InverseMapper

public InverseMapper()
Method Detail

map

public void map(K key,
                V value,
                org.apache.hadoop.mapreduce.Mapper.Context context)
         throws IOException,
                InterruptedException
The inverse function. Input keys and values are swapped.

Overrides:
map in class Mapper<K,V,V,K>
Throws:
IOException
InterruptedException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.