@InterfaceAudience.Private public class ScanDeleteTracker extends Object implements DeleteTracker
This class is utilized through three methods:
add(org.apache.hadoop.hbase.Cell)
when encountering a Delete or DeleteColumnisDeleted(org.apache.hadoop.hbase.Cell)
when checking if a Put KeyValue has been deletedupdate()
when reaching the end of a StoreFile or row for scansThis class is NOT thread-safe as queries are never multi-threaded
DeleteTracker.DeleteCompare, DeleteTracker.DeleteResult
Modifier and Type | Field and Description |
---|---|
protected byte[] |
deleteBuffer |
protected int |
deleteLength |
protected int |
deleteOffset |
protected long |
deleteTimestamp |
protected byte |
deleteType |
protected long |
familyStamp |
protected SortedSet<Long> |
familyVersionStamps |
protected boolean |
hasFamilyStamp |
Constructor and Description |
---|
ScanDeleteTracker() |
Modifier and Type | Method and Description |
---|---|
void |
add(Cell cell)
Add the specified KeyValue to the list of deletes to check against for this row operation.
|
DeleteTracker.DeleteResult |
isDeleted(Cell cell)
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.
|
protected boolean hasFamilyStamp
protected long familyStamp
protected byte[] deleteBuffer
protected int deleteOffset
protected int deleteLength
protected byte deleteType
protected long deleteTimestamp
public void add(Cell cell)
This is called when a Delete is encountered.
add
in interface DeleteTracker
cell
- - the delete cellpublic DeleteTracker.DeleteResult isDeleted(Cell cell)
isDeleted
in interface DeleteTracker
cell
- - current cell to check if deleted by a previously seen deletepublic boolean isEmpty()
isEmpty
in interface DeleteTracker
public void reset()
DeleteTracker
This clears everything as if a new DeleteTracker was instantiated.
reset
in interface DeleteTracker
public void update()
DeleteTracker
Many optimized implementations of Trackers will require an update at when the end of each StoreFile is reached.
update
in interface DeleteTracker
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.