org.apache.hadoop.hbase.filter
Class MultipleColumnPrefixFilter
java.lang.Object
org.apache.hadoop.hbase.filter.Filter
org.apache.hadoop.hbase.filter.FilterBase
org.apache.hadoop.hbase.filter.MultipleColumnPrefixFilter
@InterfaceAudience.Public
@InterfaceStability.Stable
public class MultipleColumnPrefixFilter
- extends FilterBase
This filter is used for selecting only those keys with columns that matches
a particular prefix. For example, if prefix is 'an', it will pass keys will
columns like 'and', 'anti' but not keys with columns like 'ball', 'act'.
Fields inherited from class org.apache.hadoop.hbase.filter.Filter |
reversed |
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase |
filterAllRemaining, filterRow, filterRow, filterRowCells, filterRowKey, getNextKeyHint, hasFilterRow, isFamilyEssential, reset, transform, transformCell |
hint
protected byte[] hint
sortedPrefixes
protected TreeSet<byte[]> sortedPrefixes
MultipleColumnPrefixFilter
public MultipleColumnPrefixFilter(byte[][] prefixes)
getPrefix
public byte[][] getPrefix()
filterKeyValue
public Filter.ReturnCode filterKeyValue(Cell kv)
- Description copied from class:
FilterBase
- Filters that dont filter by key value can inherit this implementation that
includes all Cells.
- Overrides:
filterKeyValue
in class FilterBase
- Parameters:
kv
- the Cell in question
- Returns:
- code as described below
- See Also:
Filter.ReturnCode
filterColumn
public Filter.ReturnCode filterColumn(byte[] buffer,
int qualifierOffset,
int qualifierLength)
createFilterFromArguments
public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
toByteArray
public byte[] toByteArray()
- Description copied from class:
FilterBase
- Return length 0 byte array for Filters that don't require special serialization
- Overrides:
toByteArray
in class FilterBase
- Returns:
- The filter serialized using pb
parseFrom
public static MultipleColumnPrefixFilter parseFrom(byte[] pbBytes)
throws DeserializationException
- Parameters:
pbBytes
- A pb serialized MultipleColumnPrefixFilter
instance
- Returns:
- An instance of
MultipleColumnPrefixFilter
made from bytes
- Throws:
DeserializationException
- See Also:
toByteArray()
getNextCellHint
public Cell getNextCellHint(Cell kv)
- Description copied from class:
FilterBase
- Filters that are not sure which key must be next seeked to, can inherit
this implementation that, by default, returns a null Cell.
- Overrides:
getNextCellHint
in class FilterBase
- Returns:
- KeyValue which must be next seeked. return null if the filter is not sure which key to
seek to next.
createTreeSet
public TreeSet<byte[]> createTreeSet()
toString
public String toString()
- Description copied from class:
FilterBase
- Return filter's info for debugging and logging purpose.
- Overrides:
toString
in class FilterBase
toString
protected String toString(int maxPrefixes)
Copyright © 2015 The Apache Software Foundation. All rights reserved.