@InterfaceAudience.Private public abstract class FilterListBase extends FilterBase
FilterListWithOR, FilterListWithAND.Filter.ReturnCode| 限定符和类型 | 字段和说明 |
|---|---|
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. if true, we need to transform cell for the sub-filter.
|
| 构造器和说明 |
|---|
FilterListBase(List<Filter> filters) |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract void |
addFilterLists(List<Filter> filters) |
protected static boolean |
checkAndGetReversed(List<Filter> rowFilters,
boolean defaultValue) |
protected int |
compareCell(Cell a,
Cell b) |
Filter.ReturnCode |
filterKeyValue(Cell c)
A way to filter based on the column family, column qualifier and/or the column value.
|
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. sub-filters of the filter
list are children of the relative node.
|
createFilterFromArguments, filterAllRemaining, filterRow, filterRowKey, filterRowKey, getNextCellHint, reset, toByteArrayfilterCell, isReversed, parseFromprotected 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 在类中 FilterBasec - The cell in question.IOExceptionThe 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 Filter.ReturnCode filterKeyValue(Cell c) throws IOException
FilterReturnCode.NEXT_ROW, it should return
ReturnCode.NEXT_ROW until Filter.reset() is called just in case the caller calls
for the next row.
Concrete implementers can signal a failure condition in their code by throwing an
IOException.filterKeyValue 在类中 Filterc - the Cell in questionIOException - in case an I/O or an filter specific failure needs to be signaled.Filter.ReturnCodepublic void filterRowCells(List<Cell> cells) throws IOException
IOException.filterRowCells 在类中 FilterBasecells - the list of Cells to be filteredIOException - in case an I/O or an filter specific failure needs to be signaled.public boolean hasFilterRow()
FilterBasehasFilterRow 在类中 FilterBasepublic boolean isFamilyEssential(byte[] name)
throws IOException
FilterBaseIOException.isFamilyEssential 在类中 FilterBaseIOException - in case an I/O or an filter specific failure needs to be signaled.public void setReversed(boolean reversed)
FiltersetReversed 在类中 Filterreversed - flagpublic String toString()
FilterBasetoString 在类中 FilterBaseCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.