@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() |
protected CellSet |
getCellSet() |
long |
getDataSize() |
long |
getHeapSize() |
long |
getMinSequenceId() |
int |
getNumOfSegments() |
KeyValueScanner |
getScanner(long readPoint)
Creates the scanner for the given read point
|
KeyValueScanner |
getScanner(long readPoint,
long order)
Creates the scanner for the given read point, and a specific order in a list
|
List<KeyValueScanner> |
getScanners(long readPoint,
long order) |
(package private) List<KeyValueScanner> |
getSnapshotScanners() |
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 |
isEmpty() |
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) |
getNumUniqueKeys
getCellLength, getComparator, getMemStoreLAB, getMemStoreSize, getOffHeapSize, heapSizeChange, indexEntryOffHeapSize, indexEntryOnHeapSize, offHeapSizeChange, updateMetaInfo
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 KeyValueScanner getScanner(long readPoint, long order)
getScanner
in class Segment
public List<KeyValueScanner> getScanners(long readPoint, long order)
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)
internalAdd
in class Segment
protected void updateMetaInfo(Cell cellToAdd, boolean succ, boolean mslabUsed, MemStoreSizing memstoreSizing)
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()
getSnapshotScanners
in class ImmutableSegment
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.