|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.filter.RowFilterSet
public class RowFilterSet
Implementation of RowFilterInterface that represents a set of RowFilters which will be evaluated with a specified boolean operator MUST_PASS_ALL (!AND) or MUST_PASS_ONE (!OR). Since you can use RowFilterSets as children of RowFilterSet, you can create a hierarchy of filters to be evaluated.
Nested Class Summary | |
---|---|
static class |
RowFilterSet.Operator
set operator |
Constructor Summary | |
---|---|
RowFilterSet()
Default constructor, filters nothing. |
|
RowFilterSet(RowFilterSet.Operator operator,
Set<RowFilterInterface> rowFilters)
Constructor that takes a set of RowFilters and an operator. |
|
RowFilterSet(Set<RowFilterInterface> rowFilters)
Constructor that takes a set of RowFilters. |
Method Summary | |
---|---|
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 a row if: 1) The given row (@param columns) has a columnKey expected to be null AND the value associated with that columnKey is non-null. |
boolean |
processAlways()
Returns whether or not the filter should always be processed in any filtering call. |
void |
readFields(DataInput in)
Deserialize the fields of this object from in . |
void |
reset()
Resets the state of the filter. |
void |
rowProcessed(boolean filtered,
Text rowKey)
Called to let filter know the final decision (to pass or filter) on a given row. |
void |
validate(Text[] columns)
Validates that this filter applies only to a subset of the given columns. |
void |
write(DataOutput out)
Serialize 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 RowFilterSet()
public RowFilterSet(Set<RowFilterInterface> rowFilters)
rowFilters
- public RowFilterSet(RowFilterSet.Operator operator, Set<RowFilterInterface> rowFilters)
operator
- Operator to process filter set with.rowFilters
- Set of row filters.Method Detail |
---|
public void validate(Text[] columns)
validate
in interface RowFilterInterface
public void reset()
reset
in interface RowFilterInterface
public void rowProcessed(boolean filtered, Text rowKey)
rowProcessed
in interface RowFilterInterface
RowFilterSet
public boolean processAlways()
processAlways
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
in
- DataInput
to deseriablize this object from.
IOException
public void write(DataOutput out) throws IOException
out
.
write
in interface Writable
out
- DataOuput
to serialize this object into.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |