|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.filter.Filter
org.apache.hadoop.hbase.filter.FilterBase
org.apache.hadoop.hbase.filter.TimestampsFilter
@InterfaceAudience.Public @InterfaceStability.Stable public class TimestampsFilter
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 class org.apache.hadoop.hbase.filter.Filter |
---|
Filter.ReturnCode |
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hbase.filter.Filter |
---|
reversed |
Constructor Summary | |
---|---|
TimestampsFilter(List<Long> timestamps)
Constructor for filter that retains only the specified timestamps in the list. |
|
TimestampsFilter(List<Long> timestamps,
boolean canHint)
Constructor for filter that retains only those cells whose timestamp (version) is in the specified list of timestamps. |
Method Summary | |
---|---|
static Filter |
createFilterFromArguments(ArrayList<byte[]> filterArguments)
|
Filter.ReturnCode |
filterKeyValue(Cell v)
Filters that dont filter by key value can inherit this implementation that includes all Cells. |
long |
getMin()
Gets the minimum timestamp requested by filter. |
Cell |
getNextCellHint(Cell currentCell)
Pick the next cell that the scanner should seek to. |
List<Long> |
getTimestamps()
|
static TimestampsFilter |
parseFrom(byte[] pbBytes)
|
byte[] |
toByteArray()
Return length 0 byte array for Filters that don't require special serialization |
String |
toString()
Return filter's info for debugging and logging purpose. |
protected String |
toString(int maxTimestamps)
|
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase |
---|
filterAllRemaining, filterRow, filterRow, filterRowCells, filterRowKey, getNextKeyHint, hasFilterRow, isFamilyEssential, reset, 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 |
---|
public TimestampsFilter(List<Long> timestamps)
timestamps
- public TimestampsFilter(List<Long> timestamps, boolean canHint)
timestamps
- list of timestamps that are wanted.canHint
- should the filter provide a seek hint? This can skip
past delete tombstones, so it should only be used when that
is not an issue ( no deletes, or don't care if data
becomes visible)Method Detail |
---|
public List<Long> getTimestamps()
public long getMin()
public Filter.ReturnCode filterKeyValue(Cell v)
FilterBase
filterKeyValue
in class FilterBase
v
- the Cell in question
Filter.ReturnCode
public Cell getNextCellHint(Cell currentCell) throws IOException
getNextCellHint
in class FilterBase
IOException
- This will never happen.public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
public byte[] toByteArray()
FilterBase
toByteArray
in class FilterBase
public static TimestampsFilter parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes
- A pb serialized TimestampsFilter
instance
TimestampsFilter
made from bytes
DeserializationException
toByteArray()
public String toString()
FilterBase
toString
in class FilterBase
protected String toString(int maxTimestamps)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |