@InterfaceAudience.Public @InterfaceStability.Stable public abstract class CompareFilter extends 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.
| 限定符和类型 | 类和说明 |
|---|---|
static class |
CompareFilter.CompareOp
Comparison operators.
|
Filter.ReturnCode| 限定符和类型 | 字段和说明 |
|---|---|
protected ByteArrayComparable |
comparator |
protected CompareFilter.CompareOp |
compareOp |
| 构造器和说明 |
|---|
CompareFilter(CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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)
FilterBasetransformCell 在类中 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()
FilterBasetoString 在类中 FilterBaseCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.