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.Cell)when encountering a Delete or DeleteColumnisDeleted(org.apache.hadoop.hbase.Cell)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
FieldsModifier and TypeFieldDescriptionprotected final CellComparatorprotected byte[]protected Cellprotected intprotected intprotected longprotected byteprotected longprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the specified Cell to the list of deletes to check against for this row operation.voidThe action that needs to be performed beforeShipper.shipped()is performedReturn the comparator passed to this delete trackerCheck if the specified Cell buffer has been deleted by a previously seen delete.booleanisEmpty()Returns true if there are no current delete, false otherwisevoidreset()Called between rows.voidupdate()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:
addin interfaceDeleteTracker- Parameters:
cell- - the delete cell
-
isDeleted
Check if the specified Cell buffer has been deleted by a previously seen delete.- Specified by:
isDeletedin 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:DeleteTrackerReturns true if there are no current delete, false otherwise- Specified by:
isEmptyin interfaceDeleteTracker
-
reset
Description copied from interface:DeleteTrackerCalled between rows.This clears everything as if a new DeleteTracker was instantiated.
- Specified by:
resetin interfaceDeleteTracker
-
update
Description copied from interface:DeleteTrackerCalled 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:
updatein interfaceDeleteTracker
-
beforeShipped
Description copied from interface:ShipperListenerThe action that needs to be performed beforeShipper.shipped()is performed- Specified by:
beforeShippedin interfaceShipperListener- Throws:
IOException
-
getCellComparator
Description copied from interface:DeleteTrackerReturn the comparator passed to this delete tracker- Specified by:
getCellComparatorin interfaceDeleteTracker- Returns:
- the cell comparator
-