public class WhileMatchFilter extends FilterBase
filterAllRemaining()
as soon
as the wrapped filters Filter.filterRowKey(byte[], int, int)
,
Filter.filterKeyValue(org.apache.hadoop.hbase.KeyValue)
,
Filter.filterRow()
or
Filter.filterAllRemaining()
methods
returns true.Filter.ReturnCode
Constructor and Description |
---|
WhileMatchFilter() |
WhileMatchFilter(Filter filter) |
Modifier and Type | Method and Description |
---|---|
boolean |
filterAllRemaining()
Filters that never filter all remaining can inherit this implementation that
never stops the filter early.
|
Filter.ReturnCode |
filterKeyValue(KeyValue v)
Filters that dont filter by key value can inherit this implementation that
includes all KeyValues.
|
boolean |
filterRow()
Filters that never filter by rows based on previously gathered state from
FilterBase.filterKeyValue(KeyValue) can inherit this implementation that
never filters a row. |
boolean |
filterRowKey(byte[] buffer,
int offset,
int length)
Filters that do not filter by row key can inherit this implementation that
never filters anything.
|
Filter |
getFilter() |
boolean |
isFamilyEssential(byte[] name)
Check that given column family is essential for filter to check row.
|
void |
readFields(DataInput in) |
void |
reset()
Filters that are purely stateless and do nothing in their reset() methods can inherit
this null/empty implementation.
|
String |
toString()
Return filter's info for debugging and logging purpose.
|
KeyValue |
transform(KeyValue v)
By default no transformation takes place
|
void |
write(DataOutput out) |
createFilterFromArguments, filterRow, getNextKeyHint, hasFilterRow, isFamilyEssential
public WhileMatchFilter()
public WhileMatchFilter(Filter filter)
public Filter getFilter()
public void reset()
FilterBase
reset
in interface Filter
reset
in class FilterBase
public boolean filterAllRemaining()
FilterBase
filterAllRemaining
in interface Filter
filterAllRemaining
in class FilterBase
public boolean filterRowKey(byte[] buffer, int offset, int length)
FilterBase
filterRowKey
in interface Filter
filterRowKey
in class FilterBase
buffer
- buffer containing row keyoffset
- offset into buffer where row key startslength
- length of the row keypublic Filter.ReturnCode filterKeyValue(KeyValue v)
FilterBase
filterKeyValue
in interface Filter
filterKeyValue
in class FilterBase
v
- the KeyValue in questionFilter.ReturnCode
public KeyValue transform(KeyValue v)
FilterBase
transform
in interface Filter
transform
in class FilterBase
v
- the KeyValue in questionThe transformed KeyValue is what is eventually returned to the
client. Most filters will return the passed KeyValue unchanged.
,
for an example of a transformation.
public boolean filterRow()
FilterBase
FilterBase.filterKeyValue(KeyValue)
can inherit this implementation that
never filters a row.filterRow
in interface Filter
filterRow
in class FilterBase
public void write(DataOutput out) throws IOException
IOException
public void readFields(DataInput in) throws IOException
IOException
public boolean isFamilyEssential(byte[] name)
FilterBase
isFamilyEssential
in class FilterBase
public String toString()
FilterBase
toString
in class FilterBase
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.