org.apache.hadoop.hbase.filter
Class MultipleColumnPrefixFilter
java.lang.Object
org.apache.hadoop.hbase.filter.FilterBase
org.apache.hadoop.hbase.filter.MultipleColumnPrefixFilter
- All Implemented Interfaces:
- Filter, org.apache.hadoop.io.Writable
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'.
hint
protected byte[] hint
sortedPrefixes
protected TreeSet<byte[]> sortedPrefixes
MultipleColumnPrefixFilter
public MultipleColumnPrefixFilter()
MultipleColumnPrefixFilter
public MultipleColumnPrefixFilter(byte[][] prefixes)
getPrefix
public byte[][] getPrefix()
filterKeyValue
public Filter.ReturnCode filterKeyValue(KeyValue kv)
- Description copied from class:
FilterBase
- Filters that dont filter by key value can inherit this implementation that
includes all KeyValues.
- Specified by:
filterKeyValue
in interface Filter
- Overrides:
filterKeyValue
in class FilterBase
- Parameters:
kv
- the KeyValue 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)
write
public void write(DataOutput out)
throws IOException
- Throws:
IOException
readFields
public void readFields(DataInput in)
throws IOException
- Throws:
IOException
getNextKeyHint
public KeyValue getNextKeyHint(KeyValue 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 KeyValue.
- Specified by:
getNextKeyHint
in interface Filter
- Overrides:
getNextKeyHint
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 © 2013 The Apache Software Foundation. All Rights Reserved.