RegexMapper (Hadoop 0.20.2-cdh3u4 API)
Date: 2012-05-07

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.mapreduce.lib.map
Class RegexMapper<K>

    java.lang.Object
      org.apache.hadoop.mapreduce.Mapper<K,Text,Text,LongWritable>
          org.apache.hadoop.mapreduce.lib.map.RegexMapper<K>

    public class RegexMapper<K>

extends Mapper<K,Text,Text,LongWritable>

A `Mapper` that extracts text matching a regular expression.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
`Mapper.Context`

Field Summary
`static String` | `GROUP`
`static String` | `PATTERN`

Constructor Summary
`RegexMapper()`

Method Summary
`void` | `map(K key, Text value, Mapper.Context context)` Called once for each key/value pair in the input split.
`void` | `setup(Mapper.Context context)` Called once at the beginning of the task.

Methods inherited from class org.apache.hadoop.mapreduce.Mapper
`cleanup, run`

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

Field Detail

### PATTERN

    public static String PATTERN

### GROUP

    public static String GROUP

Constructor Detail

### RegexMapper

    public RegexMapper()

Method Detail

### setup

    public void setup(Mapper.Context context)

  Description copied from class: `Mapper`
  Called once at the beginning of the task.

  Overrides:
    `setup` in class `Mapper<K,Text,Text,LongWritable>`

### map

    public void map(K key,
                    Text value,
                    Mapper.Context context)
             throws IOException,
                    InterruptedException

  Description copied from class: `Mapper`
  Called once for each key/value pair in the input split. Most applications should override this, but the default is the identity function.

  Overrides:
    `map` in class `Mapper<K,Text,Text,LongWritable>`
  Throws:
    `IOException`
    `InterruptedException`

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