## org.apache.hadoop.contrib.index.mapred
Class IndexUpdateMapper<K extends WritableComparable,V extends Writable>

    java.lang.Object
      org.apache.hadoop.mapred.MapReduceBase
          org.apache.hadoop.contrib.index.mapred.IndexUpdateMapper<K,V>

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

    public class IndexUpdateMapper<K extends WritableComparable,V extends Writable>

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

This class applies local analysis on a key-value pair and then convert the result docid-operation pair to a shard-and-intermediate form pair.

Constructor Summary
`IndexUpdateMapper()`

Method Summary
`void` `close()` Default implementation that does nothing.
`void` `configure(JobConf job)` Default implementation that does nothing.
`static Class<? extends WritableComparable>` `getMapOutputKeyClass()` Get the map output key class.
`static Class<? extends Writable>` `getMapOutputValueClass()` Get the map output value class.
`void` `map(K key, V value, OutputCollector<Shard,IntermediateForm> output, Reporter reporter)` Map a key-value pair to a shard-and-intermediate form pair.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### IndexUpdateMapper

    public IndexUpdateMapper()

Method Detail

### getMapOutputKeyClass

    public static Class<? extends WritableComparable> getMapOutputKeyClass()

  Get the map output key class.

  Returns:
    the map output key class

### getMapOutputValueClass

    public static Class<? extends Writable> getMapOutputValueClass()

  Get the map output value class.

  Returns:
    the map output value class

### map

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

  Map a key-value pair to a shard-and-intermediate form pair. Internally, the local analysis is first applied to map the key-value pair to a document id-and-operation pair, then the docid-and-operation pair is mapped to a shard-intermediate form pair. The intermediate form is of the form of a single-document ram index and/or a single delete term.

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

### configure

    public void configure(JobConf job)

  Description copied from class: `MapReduceBase`
  Default implementation that does nothing.

  Specified by:
    `configure` in interface `JobConfigurable`
  Overrides:
    `configure` in class `MapReduceBase`
  Parameters:
    `job` - the configuration

### close

    public void close()
               throws IOException

  Description copied from class: `MapReduceBase`
  Default implementation that does nothing.

  Specified by:
    `close` in interface `Closeable`
  Overrides:
    `close` in class `MapReduceBase`
  Throws:
    `IOException`

Copyright © 2009 The Apache Software Foundation