@InterfaceAudience.Private public abstract class FilterBase extends Filter
Filter.ReturnCode| 构造器和说明 |
|---|
FilterBase() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Filter |
createFilterFromArguments(ArrayList<byte[]> filterArguments)
Given the filter's arguments it constructs the filter
|
boolean |
filterAllRemaining()
Filters that never filter all remaining can inherit this implementation that
never stops the filter early.
|
boolean |
filterRow()
Filters that never filter by rows based on previously gathered state from
Filter.filterCell(Cell) can inherit this implementation that
never filters a row. |
void |
filterRowCells(List<Cell> ignored)
Filters that never filter by modifying the returned List of Cells can
inherit this implementation that does nothing.
|
boolean |
filterRowKey(byte[] buffer,
int offset,
int length)
已过时。
As of release 2.0.0, this will be removed in HBase 3.0.0.
Instead use
filterRowKey(Cell) |
boolean |
filterRowKey(Cell cell)
Filters a row based on the row key.
|
Cell |
getNextCellHint(Cell currentCell)
Filters that are not sure which key must be next seeked to, can inherit
this implementation that, by default, returns a null Cell.
|
boolean |
hasFilterRow()
Fitlers that never filter by modifying the returned List of Cells can
inherit this implementation that does nothing.
|
boolean |
isFamilyEssential(byte[] name)
By default, we require all scan's column families to be present.
|
void |
reset()
Filters that are purely stateless and do nothing in their reset() methods can inherit
this null/empty implementation.
|
byte[] |
toByteArray()
Return length 0 byte array for Filters that don't require special serialization
|
String |
toString()
Return filter's info for debugging and logging purpose.
|
Cell |
transformCell(Cell v)
By default no transformation takes place
Give the filter a chance to transform the passed KeyValue.
|
filterCell, filterKeyValue, isReversed, parseFrom, setReversedpublic void reset()
throws IOException
IOException.reset 在类中 FilterIOException - in case an I/O or an filter specific failure needs to be signaled.@Deprecated public boolean filterRowKey(byte[] buffer, int offset, int length) throws IOException
filterRowKey(Cell)Filter.filterCell(Cell) below.
Concrete implementers can signal a failure condition in their code by throwing an
IOException.filterRowKey 在类中 Filterbuffer - buffer containing row keyoffset - offset into buffer where row key startslength - length of the row keyIOException - in case an I/O or an filter specific failure needs to be signaled.public boolean filterRowKey(Cell cell) throws IOException
FilterFilter.filterCell(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 在类中 Filtercell - The first cell coming in the new rowIOException - in case an I/O or an filter specific failure needs to be signaled.public boolean filterAllRemaining()
throws IOException
IOException.filterAllRemaining 在类中 FilterIOException - in case an I/O or an filter specific failure needs to be signaled.public Cell transformCell(Cell v) throws IOException
transformCell 在类中 Filterv - 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 void filterRowCells(List<Cell> ignored) throws IOException
IOException.filterRowCells 在类中 Filterignored - the list of Cells to be filteredIOException - in case an I/O or an filter specific failure needs to be signaled.public boolean hasFilterRow()
hasFilterRow 在类中 Filterpublic boolean filterRow()
throws IOException
Filter.filterCell(Cell) can inherit this implementation that
never filters a row.
Last chance to veto row based on previous Filter.filterCell(Cell) calls. The filter
needs to retain state then return a particular value for this call if they wish to exclude a
row if a certain column is missing (for example).
Concrete implementers can signal a failure condition in their code by throwing an
IOException.filterRow 在类中 FilterIOException - in case an I/O or an filter specific failure needs to be signaled.public Cell getNextCellHint(Cell currentCell) throws IOException
IOException.getNextCellHint 在类中 FilterIOException - in case an I/O or an filter specific failure needs to be signaled.public boolean isFamilyEssential(byte[] name)
throws IOException
IOException.isFamilyEssential 在类中 FilterIOException - in case an I/O or an filter specific failure needs to be signaled.public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
filterArguments - the filter's argumentspublic String toString()
public byte[] toByteArray()
throws IOException
toByteArray 在类中 FilterIOException - in case an I/O or an filter specific failure needs to be signaled.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.