org.apache.hadoop.hbase.filter
Class RegExpRowFilter

java.lang.Object
  extended by org.apache.hadoop.hbase.filter.RegExpRowFilter
All Implemented Interfaces:
RowFilterInterface, org.apache.hadoop.io.Writable

Deprecated. This interface doesn't work well in new KeyValue world. Use filters based on new Filter instead.

public class RegExpRowFilter
extends Object
implements RowFilterInterface

Implementation of RowFilterInterface that can filter by rowkey regular expression and/or individual column values (equals comparison only). Multiple column filters imply an implicit conjunction of filter criteria. Note that column value filtering in this interface has been replaced by ColumnValueFilter.


Constructor Summary
RegExpRowFilter()
          Deprecated. Default constructor, filters nothing.
RegExpRowFilter(String rowKeyRegExp)
          Deprecated. Constructor that takes a row key regular expression to filter on.
RegExpRowFilter(String rowKeyRegExp, Map<byte[],Cell> columnFilter)
          Deprecated. Column filtering has been replaced by ColumnValueFilter Constructor that takes a row key regular expression to filter on.
 
Method Summary
 boolean filterAllRemaining()
          Deprecated. Determines if the filter has decided that all remaining results should be filtered (skipped).
 boolean filterColumn(byte[] rowKey, byte[] colKey, byte[] data)
          Deprecated. Filters on row key, column name, and column value.
 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> kvs)
          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. Filters on just a row key.
 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 readFields(DataInput in)
          Deprecated.  
 void reset()
          Deprecated. Resets the state of the filter.
 void rowProcessed(boolean filtered, byte[] rowKey)
          Deprecated. Called to let filter know the final decision (to pass or filter) on a given row.
 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 setColumnFilter(byte[] colKey, byte[] value)
          Deprecated. Column filtering has been replaced by ColumnValueFilter Specify a value that must be matched for the given column.
 void setColumnFilters(Map<byte[],Cell> columnFilter)
          Deprecated. Column filtering has been replaced by ColumnValueFilter Set column filters for a number of columns.
 void validate(byte[][] columns)
          Deprecated. Validates that this filter applies only to a subset of the given columns.
 void write(DataOutput out)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegExpRowFilter

public RegExpRowFilter()
Deprecated. 
Default constructor, filters nothing. Required though for RPC deserialization.


RegExpRowFilter

public RegExpRowFilter(String rowKeyRegExp)
Deprecated. 
Constructor that takes a row key regular expression to filter on.

Parameters:
rowKeyRegExp -

RegExpRowFilter

@Deprecated
public RegExpRowFilter(String rowKeyRegExp,
                                  Map<byte[],Cell> columnFilter)
Deprecated. Column filtering has been replaced by ColumnValueFilter Constructor that takes a row key regular expression to filter on.

Parameters:
rowKeyRegExp -
columnFilter -
Method Detail

rowProcessed

public void rowProcessed(boolean filtered,
                         byte[] rowKey)
Deprecated. 
Description copied from interface: RowFilterInterface
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.

Specified by:
rowProcessed in interface RowFilterInterface
See Also:
RowFilterSet

rowProcessed

public void rowProcessed(boolean filtered,
                         byte[] key,
                         int offset,
                         int length)
Deprecated. 
Description copied from interface: RowFilterInterface
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.

Specified by:
rowProcessed in interface RowFilterInterface
See Also:
RowFilterSet

processAlways

public boolean processAlways()
Deprecated. 
Description copied from interface: RowFilterInterface
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.

Specified by:
processAlways in interface RowFilterInterface
Returns:
whether or not to always process the filter

setColumnFilter

@Deprecated
public void setColumnFilter(byte[] colKey,
                                       byte[] value)
Deprecated. Column filtering has been replaced by ColumnValueFilter Specify a value that must be matched for the given column.

Parameters:
colKey - the column to match on
value - the value that must equal the stored value.

setColumnFilters

@Deprecated
public void setColumnFilters(Map<byte[],Cell> columnFilter)
Deprecated. Column filtering has been replaced by ColumnValueFilter Set column filters for a number of columns.

Parameters:
columnFilter - Map of columns with value criteria.

reset

public void reset()
Deprecated. 
Description copied from interface: RowFilterInterface
Resets the state of the filter. Used prior to the start of a Region scan.

Specified by:
reset in interface RowFilterInterface

filterAllRemaining

public boolean filterAllRemaining()
Deprecated. 
Description copied from interface: RowFilterInterface
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.

Specified by:
filterAllRemaining in interface RowFilterInterface
Returns:
true if the filter intends to filter all remaining rows.

filterRowKey

public boolean filterRowKey(byte[] rowKey)
Deprecated. 
Description copied from interface: RowFilterInterface
Filters on just a row key. This is the first chance to stop a row.

Specified by:
filterRowKey in interface RowFilterInterface
Returns:
true if given row key is filtered and row should not be processed.

filterRowKey

public boolean filterRowKey(byte[] rowKey,
                            int offset,
                            int length)
Deprecated. 
Description copied from interface: RowFilterInterface
Filters on just a row key. This is the first chance to stop a row.

Specified by:
filterRowKey in interface RowFilterInterface
Returns:
true if given row key is filtered and row should not be processed.

filterColumn

public boolean filterColumn(byte[] rowKey,
                            byte[] colKey,
                            byte[] data)
Deprecated. 
Description copied from interface: RowFilterInterface
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.

Specified by:
filterColumn in interface RowFilterInterface
Parameters:
rowKey - row key to filter on.
colKey - column name to filter on
data - column value to filter on
Returns:
true if row filtered and should not be processed.

filterColumn

public boolean filterColumn(byte[] rowKey,
                            int roffset,
                            int rlength,
                            byte[] colunmName,
                            int coffset,
                            int clength,
                            byte[] columnValue,
                            int voffset,
                            int vlength)
Deprecated. 
Description copied from interface: RowFilterInterface
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.

Specified by:
filterColumn in interface RowFilterInterface
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

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

Specified by:
filterRow in interface RowFilterInterface
Returns:
true if row filtered and should not be processed.

filterRow

public boolean filterRow(List<KeyValue> kvs)
Deprecated. 
Description copied from interface: RowFilterInterface
Filter on the fully assembled row. This is the last chance to stop a row.

Specified by:
filterRow in interface RowFilterInterface
Returns:
true if row filtered and should not be processed.

readFields

public void readFields(DataInput in)
                throws IOException
Deprecated. 
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

validate

public void validate(byte[][] columns)
Deprecated. 
Description copied from interface: RowFilterInterface
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.

Specified by:
validate in interface RowFilterInterface

write

public void write(DataOutput out)
           throws IOException
Deprecated. 
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2009 The Apache Software Foundation