org.apache.hadoop.hbase.filter
Class SingleColumnValueExcludeFilter

java.lang.Object
  extended by org.apache.hadoop.hbase.filter.Filter
      extended by org.apache.hadoop.hbase.filter.FilterBase
          extended by org.apache.hadoop.hbase.filter.SingleColumnValueFilter
              extended by org.apache.hadoop.hbase.filter.SingleColumnValueExcludeFilter

@InterfaceAudience.Public
@InterfaceStability.Stable
public class SingleColumnValueExcludeFilter
extends SingleColumnValueFilter

A Filter that checks a single column value, but does not emit the tested column. This will enable a performance boost over SingleColumnValueFilter, if the tested column value is not actually needed as input (besides for the filtering itself).


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.filter.Filter
Filter.ReturnCode
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.filter.SingleColumnValueFilter
columnFamily, columnQualifier, comparator, compareOp, filterIfMissing, foundColumn, latestVersionOnly, matchedColumn
 
Fields inherited from class org.apache.hadoop.hbase.filter.Filter
reversed
 
Constructor Summary
  SingleColumnValueExcludeFilter(byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, byte[] value)
          Constructor for binary compare of the value of a single column.
  SingleColumnValueExcludeFilter(byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator)
          Constructor for binary compare of the value of a single column.
protected SingleColumnValueExcludeFilter(byte[] family, byte[] qualifier, CompareFilter.CompareOp compareOp, ByteArrayComparable comparator, boolean filterIfMissing, boolean latestVersionOnly)
          Constructor for protobuf deserialization only.
 
Method Summary
static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
           
 void filterRowCells(List<Cell> kvs)
          Filters that never filter by modifying the returned List of Cells can inherit this implementation that does nothing.
 boolean hasFilterRow()
          Fitlers that never filter by modifying the returned List of Cells can inherit this implementation that does nothing.
static SingleColumnValueExcludeFilter parseFrom(byte[] pbBytes)
           
 byte[] toByteArray()
          Return length 0 byte array for Filters that don't require special serialization
 
Methods inherited from class org.apache.hadoop.hbase.filter.SingleColumnValueFilter
filterKeyValue, filterRow, getComparator, getFamily, getFilterIfMissing, getLatestVersionOnly, getOperator, getQualifier, isFamilyEssential, reset, setFilterIfMissing, setLatestVersionOnly, toString
 
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase
filterAllRemaining, filterRow, filterRowKey, getNextCellHint, getNextKeyHint, transform, transformCell
 
Methods inherited from class org.apache.hadoop.hbase.filter.Filter
isReversed, setReversed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SingleColumnValueExcludeFilter

public SingleColumnValueExcludeFilter(byte[] family,
                                      byte[] qualifier,
                                      CompareFilter.CompareOp compareOp,
                                      byte[] value)
Constructor for binary compare of the value of a single column. If the column is found and the condition passes, all columns of the row will be emitted; except for the tested column value. If the column is not found or the condition fails, the row will not be emitted.

Parameters:
family - name of column family
qualifier - name of column qualifier
compareOp - operator
value - value to compare column values against

SingleColumnValueExcludeFilter

public SingleColumnValueExcludeFilter(byte[] family,
                                      byte[] qualifier,
                                      CompareFilter.CompareOp compareOp,
                                      ByteArrayComparable comparator)
Constructor for binary compare of the value of a single column. If the column is found and the condition passes, all columns of the row will be emitted; except for the tested column value. If the condition fails, the row will not be emitted.

Use the filterIfColumnMissing flag to set whether the rest of the columns in a row will be emitted if the specified column to check is not found in the row.

Parameters:
family - name of column family
qualifier - name of column qualifier
compareOp - operator
comparator - Comparator to use.

SingleColumnValueExcludeFilter

protected SingleColumnValueExcludeFilter(byte[] family,
                                         byte[] qualifier,
                                         CompareFilter.CompareOp compareOp,
                                         ByteArrayComparable comparator,
                                         boolean filterIfMissing,
                                         boolean latestVersionOnly)
Constructor for protobuf deserialization only.

Parameters:
family -
qualifier -
compareOp -
comparator -
filterIfMissing -
latestVersionOnly -
Method Detail

hasFilterRow

public boolean hasFilterRow()
Description copied from class: FilterBase
Fitlers that never filter by modifying the returned List of Cells can inherit this implementation that does nothing.

Overrides:
hasFilterRow in class SingleColumnValueFilter
Returns:
True if this filter actively uses filterRow(List) or filterRow().

filterRowCells

public void filterRowCells(List<Cell> kvs)
Description copied from class: FilterBase
Filters that never filter by modifying the returned List of Cells can inherit this implementation that does nothing.

Overrides:
filterRowCells in class FilterBase
Parameters:
kvs - the list of Cells to be filtered

createFilterFromArguments

public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)

toByteArray

public byte[] toByteArray()
Description copied from class: FilterBase
Return length 0 byte array for Filters that don't require special serialization

Overrides:
toByteArray in class SingleColumnValueFilter
Returns:
The filter serialized using pb

parseFrom

public static SingleColumnValueExcludeFilter parseFrom(byte[] pbBytes)
                                                throws DeserializationException
Parameters:
pbBytes - A pb serialized SingleColumnValueExcludeFilter instance
Returns:
An instance of SingleColumnValueExcludeFilter made from bytes
Throws:
DeserializationException
See Also:
toByteArray()


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.