@InterfaceAudience.Public @InterfaceStability.Stable public class MultipleColumnPrefixFilter extends 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
|
filterAllRemaining, filterRow, filterRowCells, filterRowKey, getNextKeyHint, hasFilterRow, isFamilyEssential, reset, transform
isReversed, setReversed
protected byte[] hint
protected TreeSet<byte[]> sortedPrefixes
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 MultipleColumnPrefixFilter parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes
- A pb serialized MultipleColumnPrefixFilter
instanceMultipleColumnPrefixFilter
made from bytes
DeserializationException
toByteArray()
public Cell getNextCellHint(Cell kv)
FilterBase
getNextCellHint
in class FilterBase
public TreeSet<byte[]> createTreeSet()
public String toString()
FilterBase
toString
in class FilterBase
protected String toString(int maxPrefixes)