@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) |
boolean |
equals(Object obj) |
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() |
int |
hashCode() |
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
Give the filter a chance to transform the passed KeyValue.
|
filterAllRemaining, filterRow, filterRowCells, filterRowKey, getNextKeyHint, hasFilterRow, isFamilyEssential, reset, transformisReversed, setReversedpublic byte[] getPrefix()
public Filter.ReturnCode filterKeyValue(Cell kv)
FilterReturnCode.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 Filterkv - the Cell in questionFilter.ReturnCodepublic Cell transformCell(Cell v)
FilterBasetransformCell in class FilterBasev - 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()
FilterBasetoByteArray in class FilterBasepublic static ColumnPrefixFilter parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes - A pb serialized ColumnPrefixFilter instanceColumnPrefixFilter made from bytesDeserializationExceptiontoByteArray()public Cell getNextCellHint(Cell kv)
FilterBaseIOException.getNextCellHint in class FilterBasepublic String toString()
FilterBasetoString in class FilterBaseCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.