@InterfaceAudience.Private public abstract class FilterListBase extends FilterBase
FilterListWithOR
, FilterListWithAND
.Filter.ReturnCode
Modifier and Type | Field and Description |
---|---|
protected ArrayList<Filter> |
filters |
protected ArrayList<Boolean> |
subFiltersIncludedCell
For each sub-filter in filter list, we save a boolean flag to indicate that whether the return
code of filterCell(c) for sub-filter is INCLUDE* (INCLUDE, INCLUDE_AND_NEXT_COL,
INCLUDE_AND_SEEK_NEXT_ROW) case.
|
Constructor and Description |
---|
FilterListBase(List<Filter> filters) |
Modifier and Type | Method and Description |
---|---|
abstract void |
addFilterLists(List<Filter> filters) |
protected static boolean |
checkAndGetReversed(List<Filter> rowFilters,
boolean defaultValue) |
protected int |
compareCell(Cell a,
Cell b) |
void |
filterRowCells(List<Cell> cells)
Filters that never filter by modifying the returned List of Cells can inherit this
implementation that does nothing.
|
protected abstract String |
formatLogFilters(List<Filter> logFilters) |
ArrayList<Filter> |
getFilters() |
boolean |
hasFilterRow()
Fitlers that never filter by modifying the returned List of Cells can
inherit this implementation that does nothing.
|
boolean |
isEmpty() |
boolean |
isFamilyEssential(byte[] name)
By default, we require all scan's column families to be present.
|
protected static boolean |
isInReturnCodes(Filter.ReturnCode testRC,
Filter.ReturnCode... returnCodes) |
void |
setReversed(boolean reversed)
alter the reversed scan flag
|
int |
size() |
String |
toString()
Return filter's info for debugging and logging purpose.
|
Cell |
transformCell(Cell c)
For FilterList, we can consider a filter list as a node in a tree.
|
createFilterFromArguments, filterAllRemaining, filterRow, filterRowKey, getNextCellHint, getNextKeyHint, reset, toByteArray, transform
filterKeyValue, isReversed, parseFrom
protected ArrayList<Boolean> subFiltersIncludedCell
protected static boolean isInReturnCodes(Filter.ReturnCode testRC, Filter.ReturnCode... returnCodes)
protected static boolean checkAndGetReversed(List<Filter> rowFilters, boolean defaultValue)
public int size()
public boolean isEmpty()
public Cell transformCell(Cell c) throws IOException
transformCell
in class FilterBase
c
- The cell in question.IOException
The 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 void filterRowCells(List<Cell> cells) throws IOException
IOException
.filterRowCells
in class FilterBase
cells
- the list of Cells to be filteredIOException
- in case an I/O or an filter specific failure needs to be signaled.public boolean hasFilterRow()
FilterBase
hasFilterRow
in class FilterBase
public boolean isFamilyEssential(byte[] name) throws IOException
FilterBase
IOException
.isFamilyEssential
in class FilterBase
IOException
- in case an I/O or an filter specific failure needs to be signaled.public void setReversed(boolean reversed)
Filter
setReversed
in class Filter
reversed
- flagpublic String toString()
FilterBase
toString
in class FilterBase
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.