org.apache.hadoop.hbase.filter
Class TimestampsFilter

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

public class TimestampsFilter
extends FilterBase

Filter that returns only cells whose timestamp (version) is in the specified list of timestamps (versions).

Note: Use of this filter overrides any time range/time stamp options specified using Get.setTimeRange(long, long), Scan.setTimeRange(long, long), Get.setTimeStamp(long), or Scan.setTimeStamp(long).


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.filter.Filter
Filter.ReturnCode
 
Constructor Summary
TimestampsFilter()
          Used during deserialization.
TimestampsFilter(List<Long> timestamps)
          Constructor for filter that retains only those cells whose timestamp (version) is in the specified list of timestamps.
 
Method Summary
 Filter.ReturnCode filterKeyValue(KeyValue v)
          Filters that dont filter by key value can inherit this implementation that includes all KeyValues.
 long getMin()
          Gets the minimum timestamp requested by filter.
 void readFields(DataInput in)
           
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase
filterAllRemaining, filterRow, filterRow, filterRowKey, getNextKeyHint, hasFilterRow, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimestampsFilter

public TimestampsFilter()
Used during deserialization. Do not use otherwise.


TimestampsFilter

public TimestampsFilter(List<Long> timestamps)
Constructor for filter that retains only those cells whose timestamp (version) is in the specified list of timestamps.

Parameters:
timestamps -
Method Detail

getMin

public long getMin()
Gets the minimum timestamp requested by filter.

Returns:
minimum timestamp requested by filter.

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

readFields

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

write

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


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