|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.accumulo.core.iterators.WrappingIterator
org.apache.accumulo.core.iterators.Filter
org.apache.accumulo.core.iterators.user.RegExFilter
public class RegExFilter
A Filter that matches entries based on Java regular expressions.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.accumulo.core.iterators.OptionDescriber |
|---|
OptionDescriber.IteratorOptions |
| Field Summary | |
|---|---|
static String |
COLF_REGEX
|
static String |
COLQ_REGEX
|
static String |
ENCODING
|
static String |
ENCODING_DEFAULT
|
static String |
OR_FIELDS
|
static String |
ROW_REGEX
|
static String |
VALUE_REGEX
|
| Constructor Summary | |
|---|---|
RegExFilter()
|
|
| Method Summary | |
|---|---|
boolean |
accept(Key key,
Value value)
|
SortedKeyValueIterator<Key,Value> |
deepCopy(IteratorEnvironment env)
Creates a deep copy of this iterator as though seek had not yet been called. |
OptionDescriber.IteratorOptions |
describeOptions()
Gets an iterator options object that contains information needed to configure this iterator. |
void |
init(SortedKeyValueIterator<Key,Value> source,
Map<String,String> options,
IteratorEnvironment env)
Initializes the iterator. |
static void |
setEncoding(IteratorSetting si,
String encoding)
Set the encoding string to use when interpreting characters |
static void |
setRegexs(IteratorSetting si,
String rowTerm,
String cfTerm,
String cqTerm,
String valueTerm,
boolean orFields)
Encode the terms to match against in the iterator |
boolean |
validateOptions(Map<String,String> options)
Check to see if an options map contains all options required by an iterator and that the option values are in the expected formats. |
| Methods inherited from class org.apache.accumulo.core.iterators.Filter |
|---|
findTop, next, seek, setNegate |
| Methods inherited from class org.apache.accumulo.core.iterators.WrappingIterator |
|---|
getSource, getTopKey, getTopValue, hasTop, setSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ROW_REGEX
public static final String COLF_REGEX
public static final String COLQ_REGEX
public static final String VALUE_REGEX
public static final String OR_FIELDS
public static final String ENCODING
public static final String ENCODING_DEFAULT
| Constructor Detail |
|---|
public RegExFilter()
| Method Detail |
|---|
public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env)
SortedKeyValueIterator
deepCopy in interface SortedKeyValueIterator<Key,Value>deepCopy in class Filterenv - IteratorEnvironment environment in which iterator is being run.
public boolean accept(Key key,
Value value)
accept in class Filter
public void init(SortedKeyValueIterator<Key,Value> source,
Map<String,String> options,
IteratorEnvironment env)
throws IOException
SortedKeyValueIterator
init in interface SortedKeyValueIterator<Key,Value>init in class Filtersource - SortedKeyValueIterator source to read data from.options - Map map of string option names to option values.env - IteratorEnvironment environment in which iterator is being run.
IOException - unused.public OptionDescriber.IteratorOptions describeOptions()
OptionDescriber
describeOptions in interface OptionDescriberdescribeOptions in class Filterpublic boolean validateOptions(Map<String,String> options)
OptionDescriber
validateOptions in interface OptionDescribervalidateOptions in class Filteroptions - a map of option names to option values
public static void setRegexs(IteratorSetting si,
String rowTerm,
String cfTerm,
String cqTerm,
String valueTerm,
boolean orFields)
si - ScanIterator config to be updatedrowTerm - the pattern to match against the Key's row. Not used if null.cfTerm - the pattern to match against the Key's column family. Not used if null.cqTerm - the pattern to match against the Key's column qualifier. Not used if null.valueTerm - the pattern to match against the Key's value. Not used if null.orFields - if true, any of the non-null terms can match to return the entry
public static void setEncoding(IteratorSetting si,
String encoding)
si - ScanIterator config to be updatedencoding - the encoding string to use for character interpretation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||