Class ScanDeleteTracker
java.lang.Object
org.apache.hadoop.hbase.regionserver.querymatcher.ScanDeleteTracker
- All Implemented Interfaces:
DeleteTracker
,ShipperListener
- Direct Known Subclasses:
VisibilityScanDeleteTracker
This class is responsible for the tracking and enforcement of Deletes during the course of a Scan
operation. It only has to enforce Delete and DeleteColumn, since the DeleteFamily is handled at a
higher level.
This class is utilized through three methods:
add(org.apache.hadoop.hbase.ExtendedCell)
when encountering a Delete or DeleteColumnisDeleted(org.apache.hadoop.hbase.ExtendedCell)
when checking if a Put Cell has been deletedupdate()
when reaching the end of a StoreFile or row for scans
This class is NOT thread-safe as queries are never multi-threaded
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.regionserver.querymatcher.DeleteTracker
DeleteTracker.DeleteResult
-
Field Summary
Modifier and TypeFieldDescriptionprotected final CellComparator
protected byte[]
protected ExtendedCell
protected int
protected int
protected long
protected byte
protected long
protected boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ExtendedCell cell) Add the specified Cell to the list of deletes to check against for this row operation.void
The action that needs to be performed beforeShipper.shipped()
is performedReturn the comparator passed to this delete trackerisDeleted
(ExtendedCell cell) Check if the specified Cell buffer has been deleted by a previously seen delete.boolean
isEmpty()
Returns true if there are no current delete, false otherwisevoid
reset()
Called between rows.void
update()
Called at the end of every StoreFile.
-
Field Details
-
hasFamilyStamp
-
familyStamp
-
familyVersionStamps
-
deleteCell
-
deleteBuffer
-
deleteOffset
-
deleteLength
-
deleteType
-
deleteTimestamp
-
comparator
-
-
Constructor Details
-
ScanDeleteTracker
-
-
Method Details
-
add
Add the specified Cell to the list of deletes to check against for this row operation.This is called when a Delete is encountered.
- Specified by:
add
in interfaceDeleteTracker
- Parameters:
cell
- - the delete cell
-
isDeleted
Check if the specified Cell buffer has been deleted by a previously seen delete.- Specified by:
isDeleted
in interfaceDeleteTracker
- Parameters:
cell
- - current cell to check if deleted by a previously seen delete- Returns:
- deleteResult The result tells whether the Cell is deleted and why
-
isEmpty
Description copied from interface:DeleteTracker
Returns true if there are no current delete, false otherwise- Specified by:
isEmpty
in interfaceDeleteTracker
-
reset
Description copied from interface:DeleteTracker
Called between rows.This clears everything as if a new DeleteTracker was instantiated.
- Specified by:
reset
in interfaceDeleteTracker
-
update
Description copied from interface:DeleteTracker
Called at the end of every StoreFile.Many optimized implementations of Trackers will require an update at when the end of each StoreFile is reached.
- Specified by:
update
in interfaceDeleteTracker
-
beforeShipped
Description copied from interface:ShipperListener
The action that needs to be performed beforeShipper.shipped()
is performed- Specified by:
beforeShipped
in interfaceShipperListener
- Throws:
IOException
-
getCellComparator
Description copied from interface:DeleteTracker
Return the comparator passed to this delete tracker- Specified by:
getCellComparator
in interfaceDeleteTracker
- Returns:
- the cell comparator
-