@InterfaceAudience.Private public class ScanDeleteTracker extends Object implements DeleteTracker
This class is utilized through three methods:
add(byte[], int, int, long, byte) when encountering a Delete or DeleteColumn
isDeleted(byte[], int, int, long) when checking if a Put KeyValue has been deleted
update() when reaching the end of a StoreFile or row for scans
This class is NOT thread-safe as queries are never multi-threaded
DeleteTracker.DeleteCompare, DeleteTracker.DeleteResult| Constructor and Description |
|---|
ScanDeleteTracker()
Constructor for ScanDeleteTracker
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(byte[] buffer,
int qualifierOffset,
int qualifierLength,
long timestamp,
byte type)
Add the specified KeyValue to the list of deletes to check against for
this row operation.
|
DeleteTracker.DeleteResult |
isDeleted(byte[] buffer,
int qualifierOffset,
int qualifierLength,
long timestamp)
Check if the specified KeyValue buffer has been deleted by a previously
seen delete.
|
boolean |
isEmpty() |
void |
reset()
Called between rows.
|
void |
update()
Called at the end of every StoreFile.
|
public void add(byte[] buffer,
int qualifierOffset,
int qualifierLength,
long timestamp,
byte type)
This is called when a Delete is encountered in a StoreFile.
add in interface DeleteTrackerbuffer - KeyValue bufferqualifierOffset - column qualifier offsetqualifierLength - column qualifier lengthtimestamp - timestamptype - delete type as bytepublic DeleteTracker.DeleteResult isDeleted(byte[] buffer, int qualifierOffset, int qualifierLength, long timestamp)
isDeleted in interface DeleteTrackerbuffer - KeyValue bufferqualifierOffset - column qualifier offsetqualifierLength - column qualifier lengthtimestamp - timestamppublic boolean isEmpty()
isEmpty in interface DeleteTrackerpublic void reset()
DeleteTrackerThis clears everything as if a new DeleteTracker was instantiated.
reset in interface DeleteTrackerpublic void update()
DeleteTrackerMany optimized implementations of Trackers will require an update at when the end of each StoreFile is reached.
update in interface DeleteTrackerCopyright © 2014 The Apache Software Foundation. All Rights Reserved.