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
SnapshotSegmentScanner
s 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
Modifier and TypeFieldDescriptionprivate final int
private final long
private final MemStoreSize
private final ImmutableSegment
private final boolean
private final TimeRangeTracker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns Number of Cells in this snapshot.long
long
getId()
Returns snapshot's identifier.Create newSnapshotSegmentScanner
s for iterating over the snapshot.ReturnsTimeRangeTracker
for all the Cells in the snapshot.boolean
Returns 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
ReturnsTimeRangeTracker
for all the Cells in the snapshot. -
getScanners
Create newSnapshotSegmentScanner
s for iterating over the snapshot.
NOTE:Here when create newSnapshotSegmentScanner
s,Segment.incScannerCount()
is invoked in theSnapshotSegmentScanner
ctor,so after we use theseSnapshotSegmentScanner
s, we must callSnapshotSegmentScanner.close()
to invokeSegment.decScannerCount()
.- Returns:
KeyValueScanner
s(Which type isSnapshotSegmentScanner
) for iterating over the snapshot.
-
isTagsPresent
Returns true if tags are present in this snapshot
-