@InterfaceAudience.Private public class CompositeImmutableSegment extends ImmutableSegment
DEEP_OVERHEADdataSize, FIXED_OVERHEAD, heapSize, minSequenceId, tagsPresent, timeRangeTracker| 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() |
List<Segment> |
getAllSegments() |
int |
getCellsCount() |
protected CellSet |
getCellSet() |
Cell |
getFirstAfter(Cell cell) |
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) |
TimeRangeTracker |
getTimeRangeTracker() |
SortedSet<Cell> |
headSet(Cell firstKeyOnRow) |
long |
heapSize() |
void |
incScannerCount() |
protected void |
incSize(long delta,
long heapOverhead)
Updates the heap size counter of the segment by the given delta
|
protected long |
indexEntrySize() |
protected void |
internalAdd(Cell cell,
boolean mslabUsed,
MemStoreSizing memstoreSizing) |
boolean |
isEmpty() |
boolean |
isTagsPresent() |
Iterator<Cell> |
iterator() |
long |
keySize() |
Cell |
last() |
Cell |
maybeCloneWithAllocator(Cell cell)
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) |
getComparator, heapSizeChange, updateMetaInfopublic 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 class Segmentpublic Cell getFirstAfter(Cell cell)
getFirstAfter in class Segmentpublic void close()
public Cell maybeCloneWithAllocator(Cell cell)
maybeCloneWithAllocator in class Segmentpublic boolean shouldSeek(TimeRange tr, long oldestUnexpiredTS)
shouldSeek in class Segmentpublic KeyValueScanner getScanner(long readPoint)
getScanner in class Segmentpublic KeyValueScanner getScanner(long readPoint, long order)
getScanner in class Segmentpublic List<KeyValueScanner> getScanners(long readPoint, long order)
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 heapSize()
protected void incSize(long delta,
long heapOverhead)
public 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)
internalAdd in class Segmentprotected void updateMetaInfo(Cell cellToAdd, boolean succ, boolean mslabUsed, MemStoreSizing memstoreSizing)
updateMetaInfo in class Segmentprotected SortedSet<Cell> tailSet(Cell firstCell)
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.