public class PrefixFilter extends FilterBase
Filter.ReturnCode
Modifier and Type | Field and Description |
---|---|
protected boolean |
filterRow |
protected boolean |
passedPrefix |
protected byte[] |
prefix |
Constructor and Description |
---|
PrefixFilter() |
PrefixFilter(byte[] prefix) |
Modifier and Type | Method and Description |
---|---|
static Filter |
createFilterFromArguments(ArrayList<byte[]> filterArguments) |
boolean |
filterAllRemaining()
Filters that never filter all remaining can inherit this implementation that
never stops the filter early.
|
Filter.ReturnCode |
filterKeyValue(KeyValue ignored)
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.
|
byte[] |
getPrefix() |
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.
|
void |
write(DataOutput out) |
filterRow, getNextKeyHint, hasFilterRow, isFamilyEssential, isFamilyEssential, transform
protected byte[] prefix
protected boolean passedPrefix
protected boolean filterRow
public PrefixFilter(byte[] prefix)
public PrefixFilter()
public byte[] getPrefix()
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 ignored)
FilterBase
filterKeyValue
in interface Filter
filterKeyValue
in class FilterBase
ignored
- the KeyValue in questionFilter.ReturnCode
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 reset()
FilterBase
reset
in interface Filter
reset
in class FilterBase
public boolean filterAllRemaining()
FilterBase
filterAllRemaining
in interface Filter
filterAllRemaining
in class FilterBase
public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
public void write(DataOutput out) throws IOException
IOException
public void readFields(DataInput in) throws IOException
IOException
public String toString()
FilterBase
toString
in class FilterBase
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.