RegexMapper (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.mapreduce.lib.map, class: RegexMapper

Package 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 @Stable 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

  `org.apache.hadoop.mapreduce.Mapper.Context`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static String`
  `GROUP`
  `static String`
  `PATTERN`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RegexMapper()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `map(K key, Text value, Mapper<K,Text,Text,LongWritable>.org.apache.hadoop.mapreduce.Mapper.Context context)`
  Called once for each key/value pair in the input split.
  `void`
  `setup(Mapper<K,Text,Text,LongWritable>.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 Details

  - ### PATTERN

    public static String PATTERN

  - ### GROUP

    public static String GROUP

- ## Constructor Details

  - ### RegexMapper

    public RegexMapper()

- ## Method Details

  - ### setup

    public void setup(Mapper<K,Text,Text,LongWritable>.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, Mapper<K,Text,Text,LongWritable>.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`