org.apache.hadoop.hbase.filter
Class QualifierFilter

java.lang.Object
  extended by org.apache.hadoop.hbase.filter.FilterBase
      extended by org.apache.hadoop.hbase.filter.CompareFilter
          extended by org.apache.hadoop.hbase.filter.QualifierFilter
All Implemented Interfaces:
Filter, org.apache.hadoop.io.Writable

public class QualifierFilter
extends CompareFilter

This filter is used to filter based on the column qualifier. It takes an operator (equal, greater, not equal, etc) and a byte [] comparator for the column qualifier portion of a key.

This filter can be wrapped with WhileMatchFilter and SkipFilter to add more control.

Multiple filters can be combined using FilterList.

If an already known column qualifier is looked for, use Get.addColumn(byte[], byte[]) directly rather than a filter.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.filter.CompareFilter
CompareFilter.CompareOp
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.filter.Filter
Filter.ReturnCode
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.filter.CompareFilter
comparator, compareOp
 
Constructor Summary
QualifierFilter()
          Writable constructor, do not use.
QualifierFilter(CompareFilter.CompareOp op, WritableByteArrayComparable qualifierComparator)
          Constructor.
 
Method Summary
static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
           
 Filter.ReturnCode filterKeyValue(KeyValue v)
          Filters that dont filter by key value can inherit this implementation that includes all KeyValues.
 
Methods inherited from class org.apache.hadoop.hbase.filter.CompareFilter
doCompare, extractArguments, getComparator, getOperator, readFields, write
 
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase
filterAllRemaining, filterRow, filterRow, filterRowKey, getNextKeyHint, hasFilterRow, reset, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QualifierFilter

public QualifierFilter()
Writable constructor, do not use.


QualifierFilter

public QualifierFilter(CompareFilter.CompareOp op,
                       WritableByteArrayComparable qualifierComparator)
Constructor.

Parameters:
op - the compare op for column qualifier matching
qualifierComparator - the comparator for column qualifier matching
Method Detail

filterKeyValue

public Filter.ReturnCode filterKeyValue(KeyValue v)
Description copied from class: FilterBase
Filters that dont filter by key value can inherit this implementation that includes all KeyValues.

Specified by:
filterKeyValue in interface Filter
Overrides:
filterKeyValue in class FilterBase
Parameters:
v - the KeyValue in question
Returns:
code as described below
See Also:
Filter.ReturnCode

createFilterFromArguments

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


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.