@InterfaceAudience.Private public class CompositeImmutableSegment extends ImmutableSegment
Modifier and Type | Field and Description |
---|---|
private long |
keySize |
private List<ImmutableSegment> |
segments |
DEEP_OVERHEAD
FIXED_OVERHEAD, memStoreSizing, minSequenceId, tagsPresent, timeRangeTracker
DUD
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) |
getNumUniqueKeys
compareAndSetDataSize, getCellLength, getComparator, getMemStoreLAB, getMemStoreSize, getOffHeapSize, heapSizeChange, indexEntryOffHeapSize, indexEntryOnHeapSize, offHeapSizeChange, sharedLock, sharedUnlock, updateMetaInfo, waitForUpdates
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
decMemStoreSize, decMemStoreSize, incMemStoreSize
private final List<ImmutableSegment> segments
private long keySize
public CompositeImmutableSegment(CellComparator comparator, List<ImmutableSegment> segments)
public List<Segment> getAllSegments()
getAllSegments
in class ImmutableSegment
public int getNumOfSegments()
getNumOfSegments
in class ImmutableSegment
public boolean isEmpty()
public int getCellsCount()
getCellsCount
in interface MemStoreSizing
getCellsCount
in class Segment
public void close()
public Cell maybeCloneWithAllocator(Cell cell, boolean forceCloneOfBigCell)
maybeCloneWithAllocator
in class Segment
public boolean shouldSeek(TimeRange tr, long oldestUnexpiredTS)
shouldSeek
in class Segment
public KeyValueScanner getScanner(long readPoint)
getScanner
in class Segment
public List<KeyValueScanner> getScanners(long readPoint)
getScanners
in class Segment
public boolean isTagsPresent()
isTagsPresent
in class Segment
public void incScannerCount()
incScannerCount
in class Segment
public void decScannerCount()
decScannerCount
in class Segment
protected CompositeImmutableSegment setCellSet(CellSet cellSetOld, CellSet cellSetNew)
setCellSet
in class Segment
protected long indexEntrySize()
indexEntrySize
in class Segment
protected boolean canBeFlattened()
canBeFlattened
in class ImmutableSegment
public long getDataSize()
getDataSize
in interface MemStoreSizing
getDataSize
in class Segment
public long getHeapSize()
getHeapSize
in interface MemStoreSizing
getHeapSize
in class Segment
public long incMemStoreSize(long delta, long heapOverhead, long offHeapOverhead, int cellsCount)
incMemStoreSize
in interface MemStoreSizing
incMemStoreSize
in class Segment
public long getMinSequenceId()
getMinSequenceId
in class Segment
public TimeRangeTracker getTimeRangeTracker()
getTimeRangeTracker
in class Segment
public int compareRows(Cell left, Cell right)
compareRows
in class Segment
protected CellSet getCellSet()
getCellSet
in class Segment
protected void internalAdd(Cell cell, boolean mslabUsed, MemStoreSizing memstoreSizing, boolean sizeAddedPreOperation)
internalAdd
in class Segment
protected void updateMetaInfo(Cell cellToAdd, boolean succ, boolean mslabUsed, MemStoreSizing memstoreSizing, boolean sizeAddedPreOperation)
updateMetaInfo
in class Segment
protected SortedSet<Cell> tailSet(Cell firstCell)
void dump(org.slf4j.Logger log)
public String toString()
toString
in class ImmutableSegment
List<KeyValueScanner> getSnapshotScanners()
ImmutableSegment
SnapshotSegmentScanner
to increase the reference count of
MemStoreLABImpl
used by this segment.getSnapshotScanners
in class ImmutableSegment
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.