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>

    @InterfaceAudience.Public
    @InterfaceStability.Stable
    public class RegexMapper<K>

extends Mapper<K,Text,Text,LongWritable>

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

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

Constructor Summary
`RegexMapper()`

Method Summary
`void` | `map(K key, Text value, org.apache.hadoop.mapreduce.Mapper.Context context)` Called once for each key/value pair in the input split.
`void` | `setup(org.apache.hadoop.mapreduce.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(org.apache.hadoop.mapreduce.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,
                    org.apache.hadoop.mapreduce.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 © 2012 Apache Software Foundation. All Rights Reserved.