|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.filter.FilterList
public class FilterList
Implementation of Filter that represents an ordered List of Filters
which will be evaluated with a specified boolean operator FilterList.Operator.MUST_PASS_ALL
(!AND) or FilterList.Operator.MUST_PASS_ONE (!OR).
Since you can use Filter Lists as children of Filter Lists, you can create a
hierarchy of filters to be evaluated.
Defaults to FilterList.Operator.MUST_PASS_ALL.
TODO: Fix creation of Configuration on serialization and deserialization.
| Nested Class Summary | |
|---|---|
static class |
FilterList.Operator
set operator |
| Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.filter.Filter |
|---|
Filter.ReturnCode |
| Constructor Summary | |
|---|---|
FilterList()
Default constructor, filters nothing. |
|
FilterList(FilterList.Operator operator)
Constructor that takes an operator. |
|
FilterList(FilterList.Operator operator,
List<Filter> rowFilters)
Constructor that takes a set of Filters and an operator. |
|
FilterList(List<Filter> rowFilters)
Constructor that takes a set of Filters. |
|
| Method Summary | |
|---|---|
void |
addFilter(Filter filter)
Add a filter. |
boolean |
filterAllRemaining()
If this returns true, the scan will terminate. |
Filter.ReturnCode |
filterKeyValue(KeyValue v)
A way to filter based on the column family, column qualifier and/or the column value. |
boolean |
filterRow()
Last chance to veto row based on previous Filter.filterKeyValue(KeyValue)
calls. |
boolean |
filterRowKey(byte[] rowKey,
int offset,
int length)
Filters a row based on the row key. |
List<Filter> |
getFilters()
Get the filters. |
FilterList.Operator |
getOperator()
Get the operator. |
void |
readFields(DataInput in)
|
void |
reset()
Reset the state of the filter between rows. |
void |
write(DataOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FilterList()
public FilterList(List<Filter> rowFilters)
Filters. The default operator
MUST_PASS_ALL is assumed.
rowFilters - public FilterList(FilterList.Operator operator)
operator - Operator to process filter set with.
public FilterList(FilterList.Operator operator,
List<Filter> rowFilters)
Filters and an operator.
operator - Operator to process filter set with.rowFilters - Set of row filters.| Method Detail |
|---|
public FilterList.Operator getOperator()
public List<Filter> getFilters()
public void addFilter(Filter filter)
filter - public void reset()
Filter
reset in interface Filter
public boolean filterRowKey(byte[] rowKey,
int offset,
int length)
FilterFilter.filterKeyValue(KeyValue) below.
filterRowKey in interface FilterrowKey - buffer containing row keyoffset - offset into buffer where row key startslength - length of the row key
public boolean filterAllRemaining()
Filter
filterAllRemaining in interface Filterpublic Filter.ReturnCode filterKeyValue(KeyValue v)
FilterReturnCode.NEXT_ROW, it should return
ReturnCode.NEXT_ROW until Filter.reset() is called
just in case the caller calls for the next row.
filterKeyValue in interface Filterv - the KeyValue in question
Filter.ReturnCodepublic boolean filterRow()
FilterFilter.filterKeyValue(KeyValue)
calls. The filter needs to retain state then return a particular value for
this call if they wish to exclude a row if a certain column is missing
(for example).
filterRow in interface Filter
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.WritableIOException
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.WritableIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||