|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.filter.Filter
org.apache.hadoop.hbase.filter.FilterBase
org.apache.hadoop.hbase.filter.WhileMatchFilter
@InterfaceAudience.Public @InterfaceStability.Stable public class WhileMatchFilter
A wrapper filter that returns true from 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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.filter.Filter |
---|
Filter.ReturnCode |
Constructor Summary | |
---|---|
WhileMatchFilter(Filter filter)
|
Method Summary | |
---|---|
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 |
hasFilterRow()
Fitlers that never filter by modifying the returned List of KeyValues can inherit this implementation that does nothing. |
boolean |
isFamilyEssential(byte[] name)
By default, we require all scan's column families to be present. |
static WhileMatchFilter |
parseFrom(byte[] pbBytes)
|
void |
reset()
Filters that are purely stateless and do nothing in their reset() methods can inherit this null/empty implementation. |
byte[] |
toByteArray()
Return length 0 byte array for Filters that don't require special serialization |
String |
toString()
Return filter's info for debugging and logging purpose. |
KeyValue |
transform(KeyValue v)
By default no transformation takes place |
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase |
---|
createFilterFromArguments, filterRow, getNextKeyHint |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WhileMatchFilter(Filter filter)
Method Detail |
---|
public Filter getFilter()
public void reset() throws IOException
FilterBase
reset
in class FilterBase
IOException
- in case an I/O or an filter specific failure needs to be signaled.public boolean filterAllRemaining() throws IOException
FilterBase
filterAllRemaining
in class FilterBase
IOException
- in case an I/O or an filter specific failure needs to be signaled.public boolean filterRowKey(byte[] buffer, int offset, int length) throws IOException
FilterBase
filterRowKey
in class FilterBase
buffer
- buffer containing row keyoffset
- offset into buffer where row key startslength
- length of the row key
IOException
- in case an I/O or an filter specific failure needs to be signaled.public Filter.ReturnCode filterKeyValue(KeyValue v) throws IOException
FilterBase
filterKeyValue
in class FilterBase
v
- the KeyValue in question
IOException
- in case an I/O or an filter specific failure needs to be signaled.Filter.ReturnCode
public KeyValue transform(KeyValue v) throws IOException
FilterBase
transform
in class FilterBase
v
- the KeyValue in question
IOException
- in case an I/O or an filter specific failure needs to be signaled.The transformed KeyValue is what is eventually returned to the client. Most filters will
return the passed KeyValue unchanged.
,
for an example of a
transformation.
Concrete implementers can signal a failure condition in their code by throwing an
{@link IOException}.
public boolean filterRow() throws IOException
FilterBase
FilterBase.filterKeyValue(KeyValue)
can inherit this implementation that
never filters a row.
filterRow
in class FilterBase
IOException
- in case an I/O or an filter specific failure needs to be signaled.public boolean hasFilterRow()
FilterBase
hasFilterRow
in class FilterBase
public byte[] toByteArray() throws IOException
FilterBase
toByteArray
in class FilterBase
IOException
- in case an I/O or an filter specific failure needs to be signaled.public static WhileMatchFilter parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes
- A pb serialized WhileMatchFilter
instance
WhileMatchFilter
made from bytes
DeserializationException
toByteArray()
public boolean isFamilyEssential(byte[] name) throws IOException
FilterBase
isFamilyEssential
in class FilterBase
IOException
- in case an I/O or an filter specific failure needs to be signaled.public String toString()
FilterBase
toString
in class FilterBase
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |