|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.regionserver.GetDeleteTracker
public class GetDeleteTracker
This class is responsible for the tracking and enforcement of Deletes during the course of a Get operation.
This class is utilized through three methods:
add(byte[], int, int, long, byte)
when encountering a Delete
isDeleted(byte[], int, int, long)
when checking if a Put KeyValue has been deleted
update()
when reaching the end of a StoreFile
This class is NOT thread-safe as queries are never multi-threaded
Nested Class Summary | |
---|---|
protected static class |
GetDeleteTracker.Delete
Internal class used to store the necessary information for a Delete. |
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.regionserver.DeleteTracker |
---|
DeleteTracker.DeleteCompare |
Field Summary | |
---|---|
protected List<GetDeleteTracker.Delete> |
deletes
|
Constructor Summary | |
---|---|
GetDeleteTracker()
Constructor |
Method Summary | |
---|---|
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. |
protected DeleteTracker.DeleteCompare |
compareDeletes(GetDeleteTracker.Delete oldDelete,
GetDeleteTracker.Delete newDelete)
|
boolean |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List<GetDeleteTracker.Delete> deletes
Constructor Detail |
---|
public GetDeleteTracker()
Method Detail |
---|
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 DeleteTracker
buffer
- qualifierOffset
- qualifierLength
- timestamp
- type
- public boolean isDeleted(byte[] buffer, int qualifierOffset, int qualifierLength, long timestamp)
isDeleted
in interface DeleteTracker
buffer
- KeyValue bufferqualifierOffset
- column qualifier offsetqualifierLength
- column qualifier lengthtimestamp
- timestamp
public 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()
Many optimized implementations of Trackers will require an update at when the end of each StoreFile is reached.
update
in interface DeleteTracker
protected DeleteTracker.DeleteCompare compareDeletes(GetDeleteTracker.Delete oldDelete, GetDeleteTracker.Delete newDelete)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |