@InterfaceAudience.Public
@InterfaceStability.Stable
public class ColumnPrefixFilter
extends org.apache.hadoop.hbase.filter.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)
org.apache.hadoop.hbase.filter.FilterBasetransformCell in class org.apache.hadoop.hbase.filter.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()
org.apache.hadoop.hbase.filter.FilterBasetoByteArray in class org.apache.hadoop.hbase.filter.FilterBasepublic static ColumnPrefixFilter parseFrom(byte[] pbBytes) throws org.apache.hadoop.hbase.exceptions.DeserializationException
pbBytes - A pb serialized ColumnPrefixFilter instanceColumnPrefixFilter made from bytesorg.apache.hadoop.hbase.exceptions.DeserializationExceptiontoByteArray()public Cell getNextCellHint(Cell kv)
org.apache.hadoop.hbase.filter.FilterBaseIOException.getNextCellHint in class org.apache.hadoop.hbase.filter.FilterBasepublic String toString()
org.apache.hadoop.hbase.filter.FilterBasetoString in class org.apache.hadoop.hbase.filter.FilterBaseCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.