org.apache.hadoop.hbase.filter
Class ColumnPaginationFilter

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

public class ColumnPaginationFilter
extends FilterBase

A filter, based on the ColumnCountGetFilter, takes two arguments: limit and offset. This filter can be used for row-based indexing, where references to other tables are stored across many columns, in order to efficient lookups and paginated results for end users. Only most recent versions are considered for pagination.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.filter.Filter
Filter.ReturnCode
 
Constructor Summary
ColumnPaginationFilter()
          Used during serialization.
ColumnPaginationFilter(int limit, int offset)
           
 
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.
 int getLimit()
           
 int getOffset()
           
 void readFields(DataInput in)
           
 void reset()
          Filters that are purely stateless and do nothing in their reset() methods can inherit this null/empty implementation.
 String toString()
          Return filter's info for debugging and logging purpose.
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase
filterAllRemaining, filterRow, filterRow, filterRowKey, getNextKeyHint, hasFilterRow, isFamilyEssential, isFamilyEssential, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColumnPaginationFilter

public ColumnPaginationFilter()
Used during serialization. Do not use.


ColumnPaginationFilter

public ColumnPaginationFilter(int limit,
                              int offset)
Method Detail

getLimit

public int getLimit()
Returns:
limit

getOffset

public int getOffset()
Returns:
offset

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

reset

public void reset()
Description copied from class: FilterBase
Filters that are purely stateless and do nothing in their reset() methods can inherit this null/empty implementation.

Specified by:
reset in interface Filter
Overrides:
reset in class FilterBase

createFilterFromArguments

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

readFields

public void readFields(DataInput in)
                throws IOException
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Throws:
IOException

toString

public String toString()
Description copied from class: FilterBase
Return filter's info for debugging and logging purpose.

Overrides:
toString in class FilterBase


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