|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Filter
Interface for row and column filters directly applied within the regionserver. A filter can expect the following call sequence:
reset()
filterAllRemaining()
-> true indicates scan is over, false, keep going on.filterRowKey(byte[],int,int)
-> true to drop this row,
if false, we will also callfilterKeyValue(KeyValue)
-> true to drop this key/valuefilterRow()
-> last chance to drop entire row based on the sequence of
filterValue() calls. Eg: filter a row if it doesn't contain a specified column.
Nested Class Summary | |
---|---|
static class |
Filter.ReturnCode
Return codes for filterValue(). |
Method Summary | |
---|---|
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 filterKeyValue(KeyValue)
calls. |
boolean |
filterRowKey(byte[] buffer,
int offset,
int length)
Filters a row based on the row key. |
void |
reset()
Reset the state of the filter between rows. |
Methods inherited from interface org.apache.hadoop.io.Writable |
---|
readFields, write |
Method Detail |
---|
void reset()
boolean filterRowKey(byte[] buffer, int offset, int length)
filterKeyValue(KeyValue)
below.
buffer
- buffer containing row keyoffset
- offset into buffer where row key startslength
- length of the row key
boolean filterAllRemaining()
Filter.ReturnCode filterKeyValue(KeyValue v)
ReturnCode.NEXT_ROW
, it should return
ReturnCode.NEXT_ROW
until reset()
is called
just in case the caller calls for the next row.
v
- the KeyValue in question
Filter.ReturnCode
boolean filterRow()
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).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |