org.apache.hadoop.mapred
Class SequenceFileInputFilter.RegexFilter
java.lang.Object
org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFilter.FilterBase
org.apache.hadoop.mapred.SequenceFileInputFilter.FilterBase
org.apache.hadoop.mapred.SequenceFileInputFilter.RegexFilter
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, SequenceFileInputFilter.Filter
- Enclosing class:
- SequenceFileInputFilter<K,V>
public static class SequenceFileInputFilter.RegexFilter
- extends SequenceFileInputFilter.FilterBase
Records filter by matching key to regex
Method Summary |
boolean |
accept(Object key)
Filtering method
If key matches the regex, return true; otherwise return false |
void |
setConf(org.apache.hadoop.conf.Configuration conf)
configure the Filter by checking the configuration |
static void |
setPattern(org.apache.hadoop.conf.Configuration conf,
String regex)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.conf.Configurable |
getConf |
SequenceFileInputFilter.RegexFilter
public SequenceFileInputFilter.RegexFilter()
setPattern
public static void setPattern(org.apache.hadoop.conf.Configuration conf,
String regex)
throws PatternSyntaxException
- Throws:
PatternSyntaxException
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf)
- configure the Filter by checking the configuration
accept
public boolean accept(Object key)
- Filtering method
If key matches the regex, return true; otherwise return false
- Parameters:
key
- record key
- Returns:
- true if a record is accepted; return false otherwise
- See Also:
SequenceFileInputFilter.Filter.accept(Object)
Copyright © 2012 Apache Software Foundation. All Rights Reserved.