Method Detail

getPrefix

filterRowKey

Filters that do not filter by row key can inherit this implementation that
never filters anything. (ie: returns false).
Filters a row based on the row key. If this returns true, the entire row will be excluded. If
false, each KeyValue in the row will be passed to Filter.filterKeyValue(Cell) below.
Concrete implementers can signal a failure condition in their code by throwing an
IOException.

Overrides:

filterRowKey in class org.apache.hadoop.hbase.filter.FilterBase

Parameters:

buffer - buffer containing row key

offset - offset into buffer where row key starts

length - length of the row key

Returns:

true, remove entire row, false, include the row (maybe).

filterKeyValue

A way to filter based on the column family, column qualifier and/or the column value. Return
code is described below. This allows filters to filter only certain number of columns, then
terminate without matching ever column.
If filterRowKey returns true, filterKeyValue needs to be consistent with it.
filterKeyValue can assume that filterRowKey has already been called for the row.
If your filter returns ReturnCode.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.

transformCell

By default no transformation takes place
Give the filter a chance to transform the passed KeyValue. If the Cell is changed a new
Cell object must be returned.

Overrides:

transformCell in class org.apache.hadoop.hbase.filter.FilterBase

Parameters:

v - the KeyValue in question

Returns:

the changed KeyValue

See Also:

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}.

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.
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.

Overrides:

filterRow in class org.apache.hadoop.hbase.filter.FilterBase

Returns:

true to exclude row, false to include row.

reset

Filters that are purely stateless and do nothing in their reset() methods can inherit
this null/empty implementation.
Reset the state of the filter between rows.
Concrete implementers can signal a failure condition in their code by throwing an
IOException.

Overrides:

reset in class org.apache.hadoop.hbase.filter.FilterBase

filterAllRemaining

Filters that never filter all remaining can inherit this implementation that
never stops the filter early.
If this returns true, the scan will terminate.
Concrete implementers can signal a failure condition in their code by throwing an
IOException.