|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.filter.RegExpRowFilter
public class RegExpRowFilter
Implementation of RowFilterInterface that can filter by rowkey regular expression and/or individual column values (equals comparison only). Multiple column filters imply an implicit conjunction of filter criteria.
Constructor Summary | |
---|---|
RegExpRowFilter()
Default constructor, filters nothing. |
|
RegExpRowFilter(String rowKeyRegExp)
Constructor that takes a row key regular expression to filter on. |
|
RegExpRowFilter(String rowKeyRegExp,
Map<Text,byte[]> columnFilter)
Constructor that takes a row key regular expression to filter on. |
Method Summary | |
---|---|
void |
acceptedRow(Text key)
Called to let filter know that the specified row has been included in the results (passed all filtering). |
boolean |
filter(Text rowKey)
Filters on just a row key. |
boolean |
filter(Text rowKey,
Text colKey,
byte[] data)
Filters on row key and/or a column key. |
boolean |
filterAllRemaining()
Determines if the filter has decided that all remaining results should be filtered (skipped). |
boolean |
filterNotNull(TreeMap<Text,byte[]> columns)
Filters row if given columns are non-null and have null criteria or if there exists criteria on columns not included in the column set. |
void |
readFields(DataInput in)
Reads the fields of this object from in . |
void |
reset()
Resets the state of the filter. |
void |
setColumnFilter(Text colKey,
byte[] value)
Specify a value that must be matched for the given column. |
void |
setColumnFilters(Map<Text,byte[]> columnFilter)
Set column filters for a number of columns. |
void |
validate(Text[] columns)
Validates that this filter applies only to a subset of the given columns. |
void |
write(DataOutput out)
Writes the fields of this object to out . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegExpRowFilter()
public RegExpRowFilter(String rowKeyRegExp)
rowKeyRegExp
- public RegExpRowFilter(String rowKeyRegExp, Map<Text,byte[]> columnFilter)
rowKeyRegExp
- columnFilter
- Method Detail |
---|
public void acceptedRow(Text key)
acceptedRow
in interface RowFilterInterface
RowFilterSet
public void setColumnFilter(Text colKey, byte[] value)
colKey
- the column to match onvalue
- the value that must equal the stored value.public void setColumnFilters(Map<Text,byte[]> columnFilter)
columnFilter
- Map of columns with value criteria.public void reset()
reset
in interface RowFilterInterface
public boolean filterAllRemaining()
filterAllRemaining
in interface RowFilterInterface
public boolean filter(Text rowKey)
filter
in interface RowFilterInterface
public boolean filter(Text rowKey, Text colKey, byte[] data)
filter
in interface RowFilterInterface
rowKey
- row key to filter on. May be null for no filtering of row key.colKey
- column whose data will be filtereddata
- column value
public boolean filterNotNull(TreeMap<Text,byte[]> columns)
filterNotNull
in interface RowFilterInterface
public void readFields(DataInput in) throws IOException
in
. For efficiency,
implementations should attempt to re-use storage in the existing object
where possible.
readFields
in interface Writable
IOException
public void validate(Text[] columns)
validate
in interface RowFilterInterface
public void write(DataOutput out) throws IOException
out
.
write
in interface Writable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |