@InterfaceAudience.Public
@InterfaceStability.Stable
public class MultipleColumnPrefixFilter
extends org.apache.hadoop.hbase.filter.FilterBase
Filter.ReturnCode| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
hint |
protected TreeSet<byte[]> |
sortedPrefixes |
| Constructor and Description |
|---|
MultipleColumnPrefixFilter(byte[][] prefixes) |
| Modifier and Type | Method and Description |
|---|---|
static Filter |
createFilterFromArguments(ArrayList<byte[]> filterArguments) |
TreeSet<byte[]> |
createTreeSet() |
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 MultipleColumnPrefixFilter |
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.
|
protected String |
toString(int maxPrefixes) |
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, setReversedprotected byte[] hint
protected TreeSet<byte[]> sortedPrefixes
public 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 MultipleColumnPrefixFilter parseFrom(byte[] pbBytes) throws org.apache.hadoop.hbase.exceptions.DeserializationException
pbBytes - A pb serialized MultipleColumnPrefixFilter instanceMultipleColumnPrefixFilter 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 TreeSet<byte[]> createTreeSet()
public String toString()
org.apache.hadoop.hbase.filter.FilterBasetoString in class org.apache.hadoop.hbase.filter.FilterBaseprotected String toString(int maxPrefixes)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.