@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.filterKeyValue(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)
Filters that do not filter by row key can inherit this implementation that
never filters anything.
|
Cell |
getNextCellHint(Cell currentKV)
Filters that are not sure which key must be next seeked to, can inherit
this implementation that, by default, returns a null Cell.
|
KeyValue |
getNextKeyHint(KeyValue currentKV)
已过时。
|
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.
|
KeyValue |
transform(KeyValue currentKV)
已过时。
|
Cell |
transformCell(Cell v)
By default no transformation takes place
Give the filter a chance to transform the passed KeyValue.
|
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.public boolean filterRowKey(byte[] buffer,
int offset,
int length)
throws IOException
Filter.filterKeyValue(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 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}.@Deprecated public KeyValue transform(KeyValue currentKV) throws IOException
transformCell(Cell).
This is for transition from 0.94 -> 0.96transform 在类中 FilterIOExceptionpublic 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.filterKeyValue(Cell) can inherit this implementation that
never filters a row.
Last chance to veto row based on previous Filter.filterKeyValue(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.@Deprecated public KeyValue getNextKeyHint(KeyValue currentKV) throws IOException
getNextKeyHint 在类中 FilterIOException - Function is Deprecated. Use Filter.getNextCellHint(Cell) instead.public Cell getNextCellHint(Cell currentKV) 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–2021 The Apache Software Foundation. All rights reserved.