@InterfaceAudience.Private public class TimeRangeTracker extends Object implements org.apache.hadoop.io.Writable
Modifier and Type | Field and Description |
---|---|
(package private) static long |
INITIAL_MINIMUM_TIMESTAMP |
(package private) long |
maximumTimestamp |
(package private) long |
minimumTimestamp |
Constructor and Description |
---|
TimeRangeTracker()
Default constructor.
|
TimeRangeTracker(long minimumTimestamp,
long maximumTimestamp) |
TimeRangeTracker(TimeRangeTracker trt)
Copy Constructor
|
Modifier and Type | Method and Description |
---|---|
long |
getMaximumTimestamp() |
long |
getMinimumTimestamp() |
boolean |
includesTimeRange(TimeRange tr)
Check if the range has any overlap with TimeRange
|
void |
includeTimestamp(Cell cell)
Update the current TimestampRange to include the timestamp from Cell
If the Key is of type DeleteColumn or DeleteFamily, it includes the
entire time range from 0 to timestamp of the key.
|
(package private) void |
includeTimestamp(long timestamp)
If required, update the current TimestampRange to include timestamp
|
private boolean |
init(long l) |
void |
readFields(DataInput in) |
private void |
set(long min,
long max) |
String |
toString() |
void |
write(DataOutput out) |
static final long INITIAL_MINIMUM_TIMESTAMP
long minimumTimestamp
long maximumTimestamp
public TimeRangeTracker()
public TimeRangeTracker(TimeRangeTracker trt)
trt
- source TimeRangeTrackerpublic TimeRangeTracker(long minimumTimestamp, long maximumTimestamp)
private void set(long min, long max)
private boolean init(long l)
l
- public void includeTimestamp(Cell cell)
cell
- the Cell to includevoid includeTimestamp(long timestamp)
timestamp
- the timestamp value to includepublic boolean includesTimeRange(TimeRange tr)
tr
- TimeRangepublic long getMinimumTimestamp()
public long getMaximumTimestamp()
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.