@InterfaceAudience.Private public class CompositeImmutableSegment extends ImmutableSegment
| Modifier and Type | Field and Description |
|---|---|
private long |
keySize |
private List<ImmutableSegment> |
segments |
DEEP_OVERHEADFIXED_OVERHEAD, memStoreSizing, minSequenceId, tagsPresent, timeRangeTrackerDUD| Constructor and Description |
|---|
CompositeImmutableSegment(CellComparator comparator,
List<ImmutableSegment> segments) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canBeFlattened() |
void |
close()
Closing a segment before it is being discarded
|
int |
compare(Cell left,
Cell right) |
int |
compareRows(Cell left,
Cell right) |
void |
decScannerCount() |
(package private) void |
dump(org.slf4j.Logger log)
Dumps all cells of the segment into the given log
|
List<Segment> |
getAllSegments() |
int |
getCellsCount()
Returns number of cells in segment
|
protected CellSet |
getCellSet()
Returns a set of all cells in the segment
|
long |
getDataSize()
Returns Sum of all cell sizes.
|
long |
getHeapSize()
Returns The heap size of this segment.
|
long |
getMinSequenceId() |
int |
getNumOfSegments() |
KeyValueScanner |
getScanner(long readPoint)
Creates the scanner for the given read point
|
List<KeyValueScanner> |
getScanners(long readPoint) |
(package private) List<KeyValueScanner> |
getSnapshotScanners()
We create a new
SnapshotSegmentScanner to increase the reference count of
MemStoreLABImpl used by this segment. |
TimeRangeTracker |
getTimeRangeTracker() |
SortedSet<Cell> |
headSet(Cell firstKeyOnRow) |
long |
incMemStoreSize(long delta,
long heapOverhead,
long offHeapOverhead,
int cellsCount)
Updates the heap size counter of the segment by the given delta
|
void |
incScannerCount() |
protected long |
indexEntrySize() |
protected void |
internalAdd(Cell cell,
boolean mslabUsed,
MemStoreSizing memstoreSizing,
boolean sizeAddedPreOperation) |
boolean |
isEmpty()
Returns whether the segment has any cells
|
boolean |
isTagsPresent() |
Iterator<Cell> |
iterator() |
Cell |
last() |
Cell |
maybeCloneWithAllocator(Cell cell,
boolean forceCloneOfBigCell)
If the segment has a memory allocator the cell is being cloned to this space, and returned;
otherwise the given cell is returned
|
protected CompositeImmutableSegment |
setCellSet(CellSet cellSetOld,
CellSet cellSetNew)
Setting the CellSet of the segment - used only for flat immutable segment for setting immutable
CellSet after its creation in immutable segment constructor
|
boolean |
shouldSeek(TimeRange tr,
long oldestUnexpiredTS) |
protected SortedSet<Cell> |
tailSet(Cell firstCell)
Returns a subset of the segment cell set, which starts with the given cell
|
String |
toString() |
protected void |
updateMetaInfo(Cell cellToAdd,
boolean succ,
boolean mslabUsed,
MemStoreSizing memstoreSizing,
boolean sizeAddedPreOperation) |
getNumUniqueKeyscompareAndSetDataSize, getCellLength, getComparator, getMemStoreLAB, getMemStoreSize, getOffHeapSize, heapSizeChange, indexEntryOffHeapSize, indexEntryOnHeapSize, offHeapSizeChange, sharedLock, sharedUnlock, updateMetaInfo, waitForUpdatesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdecMemStoreSize, decMemStoreSize, incMemStoreSizeprivate final List<ImmutableSegment> segments
private long keySize
public CompositeImmutableSegment(CellComparator comparator, List<ImmutableSegment> segments)
public List<Segment> getAllSegments()
getAllSegments in class ImmutableSegmentpublic int getNumOfSegments()
getNumOfSegments in class ImmutableSegmentpublic boolean isEmpty()
public int getCellsCount()
getCellsCount in interface MemStoreSizinggetCellsCount in class Segmentpublic void close()
public Cell maybeCloneWithAllocator(Cell cell, boolean forceCloneOfBigCell)
maybeCloneWithAllocator in class Segmentpublic boolean shouldSeek(TimeRange tr, long oldestUnexpiredTS)
shouldSeek in class Segmentpublic KeyValueScanner getScanner(long readPoint)
getScanner in class Segmentpublic List<KeyValueScanner> getScanners(long readPoint)
getScanners in class Segmentpublic boolean isTagsPresent()
isTagsPresent in class Segmentpublic void incScannerCount()
incScannerCount in class Segmentpublic void decScannerCount()
decScannerCount in class Segmentprotected CompositeImmutableSegment setCellSet(CellSet cellSetOld, CellSet cellSetNew)
setCellSet in class Segmentprotected long indexEntrySize()
indexEntrySize in class Segmentprotected boolean canBeFlattened()
canBeFlattened in class ImmutableSegmentpublic long getDataSize()
getDataSize in interface MemStoreSizinggetDataSize in class Segmentpublic long getHeapSize()
getHeapSize in interface MemStoreSizinggetHeapSize in class Segmentpublic long incMemStoreSize(long delta, long heapOverhead, long offHeapOverhead, int cellsCount)
incMemStoreSize in interface MemStoreSizingincMemStoreSize in class Segmentpublic long getMinSequenceId()
getMinSequenceId in class Segmentpublic TimeRangeTracker getTimeRangeTracker()
getTimeRangeTracker in class Segmentpublic int compareRows(Cell left, Cell right)
compareRows in class Segmentprotected CellSet getCellSet()
getCellSet in class Segmentprotected void internalAdd(Cell cell, boolean mslabUsed, MemStoreSizing memstoreSizing, boolean sizeAddedPreOperation)
internalAdd in class Segmentprotected void updateMetaInfo(Cell cellToAdd, boolean succ, boolean mslabUsed, MemStoreSizing memstoreSizing, boolean sizeAddedPreOperation)
updateMetaInfo in class Segmentprotected SortedSet<Cell> tailSet(Cell firstCell)
void dump(org.slf4j.Logger log)
public String toString()
toString in class ImmutableSegmentList<KeyValueScanner> getSnapshotScanners()
ImmutableSegmentSnapshotSegmentScanner to increase the reference count of
MemStoreLABImpl used by this segment.getSnapshotScanners in class ImmutableSegmentCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.