InverseMapper (Hadoop 0.20.2-cdh3u1 API)
Date: 2011-07-18

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.mapred.lib
Class InverseMapper<K,V>

    java.lang.Object
      org.apache.hadoop.mapred.MapReduceBase
          org.apache.hadoop.mapred.lib.InverseMapper<K,V>

All Implemented Interfaces:
  Closeable, JobConfigurable, Mapper<K,V,V,K>

    public class InverseMapper<K,V>

extends MapReduceBase
implements Mapper<K,V,V,K>

A `Mapper` that swaps keys and values.

Constructor Summary
`InverseMapper()`

Method Summary
`void` | `map(K key, V value, OutputCollector<V,K> output, Reporter reporter)` The inverse 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 java.io.Closeable
`close`

Constructor Detail

### InverseMapper

    public InverseMapper()

Method Detail

### map

    public void map(K key,
                    V value,
                    OutputCollector<V,K> output,
                    Reporter reporter)
             throws IOException

  The inverse function. Input keys and values are swapped.

  Specified by:
    `map` in interface `Mapper<K,V,V,K>`
  Parameters:
    `key` - the input key.
    `value` - the input value.
    `output` - collects mapped keys and values.
    `reporter` - facility to report progress.
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation