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

Package org.apache.hadoop.mapreduce.lib.map

# Class TokenCounterMapper

java.lang.Object
org.apache.hadoop.mapreduce.Mapper<Object,Text,Text,IntWritable>
org.apache.hadoop.mapreduce.lib.map.TokenCounterMapper

@Public @Stable public class TokenCounterMapper extends Mapper<Object,Text,Text,IntWritable>
Tokenize the input values and emit each word with a count of 1.

- ## Nested Class Summary

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

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TokenCounterMapper()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `map(Object key, Text value, Mapper<Object,Text,Text,IntWritable>.org.apache.hadoop.mapreduce.Mapper.Context context)`
  Called once for each key/value pair in the input split.

  ### Methods inherited from class org.apache.hadoop.mapreduce.Mapper

  `cleanup, run, setup`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TokenCounterMapper

    public TokenCounterMapper()

- ## Method Details

  - ### map

    public void map(Object key, Text value, Mapper<Object,Text,Text,IntWritable>.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<Object,Text,Text,IntWritable>`
    Throws:
      `IOException`
      `InterruptedException`