Class ImmutableMemStoreLAB
java.lang.Object
org.apache.hadoop.hbase.regionserver.ImmutableMemStoreLAB
- All Implemented Interfaces:
MemStoreLAB
A MemStoreLAB implementation which wraps N MemStoreLABs. Its main duty is in proper managing the
close of the individual MemStoreLAB. This is treated as an immutable one and so do not allow to
add any more Cells into it.
copyCellInto(ExtendedCell)
throws Exception-
Field Summary
Modifier and TypeFieldDescriptionprivate final AtomicBoolean
private final List<MemStoreLAB>
private final RefCnt
Fields inherited from interface org.apache.hadoop.hbase.regionserver.MemStoreLAB
CHUNK_POOL_INITIALSIZE_KEY, CHUNK_POOL_MAXSIZE_KEY, CHUNK_SIZE_DEFAULT, CHUNK_SIZE_KEY, INDEX_CHUNK_SIZE_PERCENTAGE_DEFAULT, INDEX_CHUNK_SIZE_PERCENTAGE_KEY, MAX_ALLOC_DEFAULT, MAX_ALLOC_KEY, MSLAB_CLASS_NAME, POOL_INITIAL_SIZE_DEFAULT, POOL_MAX_SIZE_DEFAULT, USEMSLAB_DEFAULT, USEMSLAB_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close instance since it won't be used any more, try to put the chunks back to poolprivate void
copyCellInto
(ExtendedCell cell) Allocates slice in this LAB and copy the passed Cell into this area.void
Called when closing a scanner on the data of this MemStoreLABThe process of merging assumes all cells are allocated on mslab.getNewExternalChunk
(int size) getNewExternalChunk
(ChunkCreator.ChunkType chunkType) (package private) int
void
Called when opening a scanner on the data of this MemStoreLAB(package private) boolean
isClosed()
boolean
boolean
isOnHeap()
-
Field Details
-
refCnt
-
closed
-
mslabs
-
-
Constructor Details
-
ImmutableMemStoreLAB
-
-
Method Details
-
copyCellInto
Description copied from interface:MemStoreLAB
Allocates slice in this LAB and copy the passed Cell into this area. Returns new Cell instance over the copied the data. When this MemStoreLAB can not copy this Cell, it returns null.- Specified by:
copyCellInto
in interfaceMemStoreLAB
-
forceCopyOfBigCellInto
The process of merging assumes all cells are allocated on mslab. There is a rare case in which the first immutable segment, participating in a merge, is a CSLM. Since the CSLM hasn't been flattened yet, and there is no point in flattening it (since it is going to be merged), its big cells (for whom size > maxAlloc) must be copied into mslab. This method copies the passed cell into the first mslab in the mslabs list, returning either a new cell instance over the copied data, or null when this cell cannt be copied.- Specified by:
forceCopyOfBigCellInto
in interfaceMemStoreLAB
-
getNewExternalChunk
- Specified by:
getNewExternalChunk
in interfaceMemStoreLAB
-
getNewExternalChunk
- Specified by:
getNewExternalChunk
in interfaceMemStoreLAB
-
close
Description copied from interface:MemStoreLAB
Close instance since it won't be used any more, try to put the chunks back to pool- Specified by:
close
in interfaceMemStoreLAB
-
closeMSLABs
-
incScannerCount
Description copied from interface:MemStoreLAB
Called when opening a scanner on the data of this MemStoreLAB- Specified by:
incScannerCount
in interfaceMemStoreLAB
-
decScannerCount
Description copied from interface:MemStoreLAB
Called when closing a scanner on the data of this MemStoreLAB- Specified by:
decScannerCount
in interfaceMemStoreLAB
-
isOnHeap
- Specified by:
isOnHeap
in interfaceMemStoreLAB
-
isOffHeap
- Specified by:
isOffHeap
in interfaceMemStoreLAB
-
getRefCntValue
int getRefCntValue() -
isClosed
boolean isClosed()
-