@InterfaceAudience.Public 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.
| 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 |
compareFamily(CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Cell cell) |
protected boolean |
compareQualifier(CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Cell cell) |
protected boolean |
compareRow(CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Cell cell) |
protected boolean |
compareValue(CompareFilter.CompareOp compareOp,
ByteArrayComparable comparator,
Cell cell) |
static ArrayList<Object> |
extractArguments(ArrayList<byte[]> filterArguments) |
boolean |
filterRowKey(Cell cell)
Filters a row based on the row key.
|
ByteArrayComparable |
getComparator() |
CompareFilter.CompareOp |
getOperator() |
String |
toString()
Return filter's info for debugging and logging purpose.
|
createFilterFromArguments, filterAllRemaining, filterRow, filterRowCells, filterRowKey, getNextCellHint, hasFilterRow, isFamilyEssential, reset, toByteArray, transformCellfilterKeyValue, 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()
public boolean filterRowKey(Cell cell) throws IOException
FilterFilter.filterKeyValue(Cell) below.
If Filter.filterAllRemaining() returns true, then Filter.filterRowKey(Cell) should
also return true.
Concrete implementers can signal a failure condition in their code by throwing an
IOException.filterRowKey in class FilterBasecell - The first cell coming in the new rowIOException - in case an I/O or an filter specific failure needs to be signaled.protected boolean compareRow(CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Cell cell)
protected boolean compareFamily(CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Cell cell)
protected boolean compareQualifier(CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Cell cell)
protected boolean compareValue(CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, Cell cell)
public static ArrayList<Object> extractArguments(ArrayList<byte[]> filterArguments)
public String toString()
FilterBasetoString in class FilterBaseCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.