public class RegexURLFilter extends RegexURLFilterBase
Java Regex implementation
.Modifier and Type | Field and Description |
---|---|
static String |
URLFILTER_REGEX_FILE |
static String |
URLFILTER_REGEX_RULES |
X_POINT_ID
Constructor and Description |
---|
RegexURLFilter() |
RegexURLFilter(String filename) |
Modifier and Type | Method and Description |
---|---|
protected RegexRule |
createRule(boolean sign,
String regex)
Creates a new
RegexRule . |
protected Reader |
getRulesReader(org.apache.hadoop.conf.Configuration conf)
Rules specified as a config property will override rules specified
as a config file.
|
static void |
main(String[] args) |
filter, getConf, main, setConf
public static final String URLFILTER_REGEX_FILE
public static final String URLFILTER_REGEX_RULES
public RegexURLFilter()
public RegexURLFilter(String filename) throws IOException, PatternSyntaxException
IOException
PatternSyntaxException
protected Reader getRulesReader(org.apache.hadoop.conf.Configuration conf) throws IOException
getRulesReader
in class RegexURLFilterBase
conf
- is the current configuration.IOException
protected RegexRule createRule(boolean sign, String regex)
RegexURLFilterBase
RegexRule
.createRule
in class RegexURLFilterBase
sign
- of the regular expression.
A true
value means that any URL matching this rule
must be included, whereas a false
value means that any URL matching this rule must be excluded.regex
- is the regular expression associated to this rule.public static void main(String[] args) throws IOException
IOException
Copyright © 2014 The Apache Software Foundation