org.apache.hadoop.mapred
Class SequenceFileInputFilter.RegexFilter
java.lang.Object
org.apache.hadoop.mapred.SequenceFileInputFilter.FilterBase
org.apache.hadoop.mapred.SequenceFileInputFilter.RegexFilter
- All Implemented Interfaces:
- 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(Configuration conf)
configure the Filter by checking the configuration |
static void |
setPattern(Configuration conf,
String regex)
Define the filtering regex and stores it in conf |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SequenceFileInputFilter.RegexFilter
public SequenceFileInputFilter.RegexFilter()
setPattern
public static void setPattern(Configuration conf,
String regex)
throws PatternSyntaxException
- Define the filtering regex and stores it in conf
- Parameters:
conf
- where the regex is setregex
- regex used as a filter
- Throws:
PatternSyntaxException
setConf
public void setConf(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 © 2009 The Apache Software Foundation