org.apache.hadoop.hbase.filter
Interface RowFilterInterface

All Superinterfaces:
org.apache.hadoop.io.Writable
All Known Implementing Classes:
ColumnValueFilter, InclusiveStopRowFilter, PageRowFilter, PrefixRowFilter, RegExpRowFilter, RowFilterSet, StopRowFilter, WhileMatchRowFilter

Deprecated. Use filters that are rooted on @{link Filter} instead

public interface RowFilterInterface
extends org.apache.hadoop.io.Writable

Interface used for row-level filters applied to HRegion.HScanner scan results during calls to next(). In HBase 0.20, not all of the functions will be called, thus filters which depend on them will not work as advertised! Specifically, you can only count on the following methods to be called: boolean filterRowKey(final byte [] rowKey, final int offset, final int length); boolean filterAllRemaining(); Complex filters that depend in more need to be rewritten to work with @{link Filter} Write new filters to use the @{link Filter} API instead.


Method Summary
 boolean filterAllRemaining()
          Deprecated. Determines if the filter has decided that all remaining results should be filtered (skipped).
 boolean filterColumn(byte[] rowKey, byte[] columnName, byte[] columnValue)
          Deprecated. Use filterColumn(byte[], int, int, byte[], int, int, byte[], int, int) instead.
 boolean filterColumn(byte[] rowKey, int roffset, int rlength, byte[] colunmName, int coffset, int clength, byte[] columnValue, int voffset, int vlength)
          Deprecated. Filters on row key, column name, and column value.
 boolean filterRow(List<KeyValue> results)
          Deprecated. Filter on the fully assembled row.
 boolean filterRow(SortedMap<byte[],Cell> columns)
          Deprecated. Filter on the fully assembled row.
 boolean filterRowKey(byte[] rowKey)
          Deprecated. Use filterRowKey(byte[], int, int) instead.
 boolean filterRowKey(byte[] rowKey, int offset, int length)
          Deprecated. Filters on just a row key.
 boolean processAlways()
          Deprecated. Returns whether or not the filter should always be processed in any filtering call.
 void reset()
          Deprecated. Resets the state of the filter.
 void rowProcessed(boolean filtered, byte[] key)
          Deprecated. Use rowProcessed(boolean, byte[], int, int) instead.
 void rowProcessed(boolean filtered, byte[] key, int offset, int length)
          Deprecated. Called to let filter know the final decision (to pass or filter) on a given row.
 void validate(byte[][] columns)
          Deprecated. Validates that this filter applies only to a subset of the given columns.
 
Methods inherited from interface org.apache.hadoop.io.Writable
readFields, write
 

Method Detail

reset

void reset()
Deprecated. 
Resets the state of the filter. Used prior to the start of a Region scan.


rowProcessed

void rowProcessed(boolean filtered,
                  byte[] key)
Deprecated. Use rowProcessed(boolean, byte[], int, int) instead.

Called to let filter know the final decision (to pass or filter) on a given row. With out HScanner calling this, the filter does not know if a row passed filtering even if it passed the row itself because other filters may have failed the row. E.g. when this filter is a member of a RowFilterSet with an OR operator.

Parameters:
filtered -
key -
See Also:
RowFilterSet

rowProcessed

void rowProcessed(boolean filtered,
                  byte[] key,
                  int offset,
                  int length)
Deprecated. 
Called to let filter know the final decision (to pass or filter) on a given row. With out HScanner calling this, the filter does not know if a row passed filtering even if it passed the row itself because other filters may have failed the row. E.g. when this filter is a member of a RowFilterSet with an OR operator.

Parameters:
filtered -
key -
offset -
length -
See Also:
RowFilterSet

processAlways

boolean processAlways()
Deprecated. 
Returns whether or not the filter should always be processed in any filtering call. This precaution is necessary for filters that maintain state and need to be updated according to their response to filtering calls (see WhileMatchRowFilter for an example). At times, filters nested in RowFilterSets may or may not be called because the RowFilterSet determines a result as fast as possible. Returning true for processAlways() ensures that the filter will always be called.

Returns:
whether or not to always process the filter

filterAllRemaining

boolean filterAllRemaining()
Deprecated. 
Determines if the filter has decided that all remaining results should be filtered (skipped). This is used to prevent the scanner from scanning a the rest of the HRegion when for sure the filter will exclude all remaining rows.

Returns:
true if the filter intends to filter all remaining rows.

filterRowKey

boolean filterRowKey(byte[] rowKey)
Deprecated. Use filterRowKey(byte[], int, int) instead.

Filters on just a row key. This is the first chance to stop a row.

Parameters:
rowKey -
Returns:
true if given row key is filtered and row should not be processed.

filterRowKey

boolean filterRowKey(byte[] rowKey,
                     int offset,
                     int length)
Deprecated. 
Filters on just a row key. This is the first chance to stop a row.

Parameters:
rowKey -
offset -
length -
Returns:
true if given row key is filtered and row should not be processed.

filterColumn

@Deprecated
boolean filterColumn(byte[] rowKey,
                                byte[] columnName,
                                byte[] columnValue)
Deprecated. Use filterColumn(byte[], int, int, byte[], int, int, byte[], int, int) instead.

Filters on row key, column name, and column value. This will take individual columns out of a row, but the rest of the row will still get through.

Parameters:
rowKey - row key to filter on.
columnName - column name to filter on
columnValue - column value to filter on
Returns:
true if row filtered and should not be processed.

filterColumn

boolean filterColumn(byte[] rowKey,
                     int roffset,
                     int rlength,
                     byte[] colunmName,
                     int coffset,
                     int clength,
                     byte[] columnValue,
                     int voffset,
                     int vlength)
Deprecated. 
Filters on row key, column name, and column value. This will take individual columns out of a row, but the rest of the row will still get through.

Parameters:
rowKey - row key to filter on.
colunmName - column name to filter on
columnValue - column value to filter on
Returns:
true if row filtered and should not be processed.

filterRow

boolean filterRow(SortedMap<byte[],Cell> columns)
Deprecated. 
Filter on the fully assembled row. This is the last chance to stop a row.

Parameters:
columns -
Returns:
true if row filtered and should not be processed.

filterRow

boolean filterRow(List<KeyValue> results)
Deprecated. 
Filter on the fully assembled row. This is the last chance to stop a row.

Parameters:
results -
Returns:
true if row filtered and should not be processed.

validate

void validate(byte[][] columns)
Deprecated. 
Validates that this filter applies only to a subset of the given columns. This check is done prior to opening of scanner due to the limitation that filtering of columns is dependent on the retrieval of those columns within the HRegion. Criteria on columns that are not part of a scanner's column list will be ignored. In the case of null value filters, all rows will pass the filter. This behavior should be 'undefined' for the user and therefore not permitted.

Parameters:
columns -


Copyright © 2010 The Apache Software Foundation