@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class CompareFilter
extends org.apache.hadoop.hbase.filter.FilterBase
To filter by row key, use RowFilter.
To filter by column qualifier, use QualifierFilter.
To filter by value, use SingleColumnValueFilter.
These filters can be wrapped with SkipFilter and WhileMatchFilter
to add more control.
Multiple filters can be combined using FilterList.
| Modifier and Type | Class and Description |
|---|---|
static class |
CompareFilter.CompareOp
Comparison operators.
|
Filter.ReturnCode| Modifier and Type | Field and Description |
|---|---|
protected ByteArrayComparable |
comparator |
protected CompareFilter.CompareOp |
compareOp |
| Constructor and Description |
|---|
CompareFilter(CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doCompare(CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
byte[] data,
int offset,
int length) |
boolean |
equals(Object obj) |
static ArrayList<Object> |
extractArguments(ArrayList<byte[]> filterArguments) |
ByteArrayComparable |
getComparator() |
CompareFilter.CompareOp |
getOperator() |
int |
hashCode() |
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.
|
createFilterFromArguments, filterAllRemaining, filterRow, filterRowCells, filterRowKey, getNextCellHint, getNextKeyHint, hasFilterRow, isFamilyEssential, reset, toByteArray, transformfilterKeyValue, isReversed, parseFrom, setReversedprotected CompareFilter.CompareOp compareOp
protected ByteArrayComparable comparator
public CompareFilter(CompareFilter.CompareOp compareOp, ByteArrayComparable comparator)
compareOp - the compare op for row matchingcomparator - the comparator for row matchingpublic CompareFilter.CompareOp getOperator()
public ByteArrayComparable getComparator()
protected boolean doCompare(CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, byte[] data, int offset, int length)
public 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 static ArrayList<Object> extractArguments(ArrayList<byte[]> filterArguments)
public 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.