@InterfaceAudience.Public @InterfaceStability.Stable public class ColumnPrefixFilter extends FilterBase
Filter.ReturnCode
Modifier and Type | Field and Description |
---|---|
protected byte[] |
prefix |
Constructor and Description |
---|
ColumnPrefixFilter(byte[] prefix) |
Modifier and Type | Method and Description |
---|---|
static Filter |
createFilterFromArguments(ArrayList<byte[]> filterArguments) |
Filter.ReturnCode |
filterColumn(byte[] buffer,
int qualifierOffset,
int qualifierLength) |
Filter.ReturnCode |
filterKeyValue(Cell kv)
A way to filter based on the column family, column qualifier and/or the column value.
|
Cell |
getNextCellHint(Cell kv)
Filters that are not sure which key must be next seeked to, can inherit
this implementation that, by default, returns a null Cell.
|
byte[] |
getPrefix() |
static ColumnPrefixFilter |
parseFrom(byte[] pbBytes) |
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.
|
Cell |
transformCell(Cell v)
By default no transformation takes place
|
filterAllRemaining, filterRow, filterRowCells, filterRowKey, getNextKeyHint, hasFilterRow, isFamilyEssential, reset, transform
isReversed, setReversed
public byte[] getPrefix()
public Filter.ReturnCode filterKeyValue(Cell kv)
Filter
ReturnCode.NEXT_ROW
, it should return
ReturnCode.NEXT_ROW
until Filter.reset()
is called just in case the caller calls
for the next row.
Concrete implementers can signal a failure condition in their code by throwing an
IOException
.filterKeyValue
in class Filter
kv
- the Cell in questionFilter.ReturnCode
public Cell transformCell(Cell v)
FilterBase
transformCell
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.
Concrete implementers can signal a failure condition in their code by throwing an
{@link IOException}.
public Filter.ReturnCode filterColumn(byte[] buffer, int qualifierOffset, int qualifierLength)
public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
public byte[] toByteArray()
FilterBase
toByteArray
in class FilterBase
public static ColumnPrefixFilter parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes
- A pb serialized ColumnPrefixFilter
instanceColumnPrefixFilter
made from bytes
DeserializationException
toByteArray()
public Cell getNextCellHint(Cell kv)
FilterBase
getNextCellHint
in class FilterBase
public String toString()
FilterBase
toString
in class FilterBase