Class MemStoreSnapshot
java.lang.Object
org.apache.hadoop.hbase.regionserver.MemStoreSnapshot
MemStoreSnapshot is a Context Object to hold details of the snapshot taken on a MemStore.
Details include the snapshot's identifier, count of cells in it and total memory size occupied by
all the cells, timestamp information of all the cells and the snapshot immutableSegment.
NOTE:Every time when getScanners() is called, we create new
SnapshotSegmentScanners on the snapshotImmutableSegment,and
Segment.incScannerCount() is invoked in the SnapshotSegmentScanner ctor to increase
the reference count of MemStoreLAB which used by
snapshotImmutableSegment, so after we finish using these scanners, we
must call their close method to invoke Segment.decScannerCount().
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final longprivate final MemStoreSizeprivate final ImmutableSegmentprivate final booleanprivate final TimeRangeTracker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns Number of Cells in this snapshot.longlonggetId()Returns snapshot's identifier.Create newSnapshotSegmentScanners for iterating over the snapshot.ReturnsTimeRangeTrackerfor all the Cells in the snapshot.booleanReturns true if tags are present in this snapshot
-
Field Details
-
id
-
cellsCount
-
memStoreSize
-
timeRangeTracker
-
tagsPresent
-
snapshotImmutableSegment
-
-
Constructor Details
-
MemStoreSnapshot
-
-
Method Details
-
getId
Returns snapshot's identifier. -
getCellsCount
Returns Number of Cells in this snapshot. -
getDataSize
-
getMemStoreSize
-
getTimeRangeTracker
ReturnsTimeRangeTrackerfor all the Cells in the snapshot. -
getScanners
Create newSnapshotSegmentScanners for iterating over the snapshot.
NOTE:Here when create newSnapshotSegmentScanners,Segment.incScannerCount()is invoked in theSnapshotSegmentScannerctor,so after we use theseSnapshotSegmentScanners, we must callSnapshotSegmentScanner.close()to invokeSegment.decScannerCount().- Returns:
KeyValueScanners(Which type isSnapshotSegmentScanner) for iterating over the snapshot.
-
isTagsPresent
Returns true if tags are present in this snapshot
-