public class RowFilter extends CompareFilter
This filter can be wrapped with WhileMatchFilter
to add more control.
Multiple filters can be combined using FilterList
.
If an already known row range needs to be scanned, use Scan
start
and stop rows directly rather than a filter.
CompareFilter.CompareOp
Filter.ReturnCode
comparator, compareOp
Constructor and Description |
---|
RowFilter()
Writable constructor, do not use.
|
RowFilter(CompareFilter.CompareOp rowCompareOp,
WritableByteArrayComparable rowComparator)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static Filter |
createFilterFromArguments(ArrayList<byte[]> filterArguments) |
Filter.ReturnCode |
filterKeyValue(KeyValue v)
Filters that dont filter by key value can inherit this implementation that
includes all KeyValues.
|
boolean |
filterRow()
Filters that never filter by rows based on previously gathered state from
FilterBase.filterKeyValue(KeyValue) can inherit this implementation that
never filters a row. |
boolean |
filterRowKey(byte[] data,
int offset,
int length)
Filters that do not filter by row key can inherit this implementation that
never filters anything.
|
void |
reset()
Filters that are purely stateless and do nothing in their reset() methods can inherit
this null/empty implementation.
|
doCompare, extractArguments, getComparator, getOperator, readFields, toString, write
filterAllRemaining, filterRow, getNextKeyHint, hasFilterRow, isFamilyEssential, isFamilyEssential, transform
public RowFilter()
public RowFilter(CompareFilter.CompareOp rowCompareOp, WritableByteArrayComparable rowComparator)
rowCompareOp
- the compare op for row matchingrowComparator
- the comparator for row matchingpublic void reset()
FilterBase
reset
in interface Filter
reset
in class FilterBase
public Filter.ReturnCode filterKeyValue(KeyValue v)
FilterBase
filterKeyValue
in interface Filter
filterKeyValue
in class FilterBase
v
- the KeyValue in questionFilter.ReturnCode
public boolean filterRowKey(byte[] data, int offset, int length)
FilterBase
filterRowKey
in interface Filter
filterRowKey
in class FilterBase
data
- buffer containing row keyoffset
- offset into buffer where row key startslength
- length of the row keypublic boolean filterRow()
FilterBase
FilterBase.filterKeyValue(KeyValue)
can inherit this implementation that
never filters a row.filterRow
in interface Filter
filterRow
in class FilterBase
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.