@InterfaceAudience.Public @InterfaceStability.Stable public class RegexMapper<K> extends Mapper<K,Text,Text,LongWritable>
Mapper
that extracts text matching a regular expression.Modifier and Type | Field and Description |
---|---|
static String |
GROUP |
static String |
PATTERN |
Constructor and Description |
---|
RegexMapper() |
Modifier and Type | Method and Description |
---|---|
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.
|
public RegexMapper()
public void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
Mapper
public void map(K key, Text value, org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException, InterruptedException
Mapper
map
in class Mapper<K,Text,Text,LongWritable>
IOException
InterruptedException
Copyright © 2015 Apache Software Foundation. All rights reserved.