@InterfaceAudience.Private public abstract class FilterListBase extends FilterBase
FilterListWithOR, FilterListWithAND.Filter.ReturnCode| Modifier and Type | Field and Description |
|---|---|
protected ArrayList<Filter> |
filters |
protected Cell |
referenceCell
Reference Cell used by
transformCell(Cell) for validation purpose. |
protected Cell |
transformedCell
When filtering a given Cell in
filterCell(Cell), this stores the transformed Cell
to be returned by transformCell(Cell). |
| 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) |
Filter.ReturnCode |
filterCell(Cell c)
A way to filter based on the column family, column qualifier and/or the column value.
|
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)
By default no transformation takes place
Give the filter a chance to transform the passed KeyValue.
|
createFilterFromArguments, filterAllRemaining, filterRow, filterRowKey, filterRowKey, getNextCellHint, reset, toByteArrayisReversed, parseFromprotected Cell referenceCell
transformCell(Cell) for validation purpose.protected Cell transformedCell
filterCell(Cell), this stores the transformed Cell
to be returned by transformCell(Cell). Individual filters transformation are applied
only when the filter includes the Cell. Transformations are composed in the order specified by
filters.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
FilterBasetransformCell in class FilterBasec - the KeyValue in questionIOException - in case an I/O or an filter specific failure needs to be signaled.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 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 in class Filterc - the Cell in questionIOException - in case an I/O or an filter specific failure needs to be signaled.Filter.ReturnCodepublic Filter.ReturnCode filterCell(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.filterCell in class 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 in class 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 in class FilterBasepublic boolean isFamilyEssential(byte[] name)
throws IOException
FilterBaseIOException.isFamilyEssential in class FilterBaseIOException - in case an I/O or an filter specific failure needs to be signaled.public void setReversed(boolean reversed)
FiltersetReversed in class Filterreversed - flagpublic String toString()
FilterBasetoString in class FilterBaseCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.