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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PATTERN
public static String PATTERN
GROUP
public static String GROUP
RegexMapper
public RegexMapper()
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
Copyright © 2014 Apache Software Foundation. All Rights Reserved.