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
FieldsModifier and TypeFieldDescriptionprivate final AtomicBooleanprivate final List<MemStoreLAB>private final RefCntFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close instance since it won't be used any more, try to put the chunks back to poolprivate voidcopyCellInto(ExtendedCell cell) Allocates slice in this LAB and copy the passed Cell into this area.voidCalled 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) intvoidCalled when opening a scanner on the data of this MemStoreLAB(package private) booleanisClosed()booleanbooleanisOnHeap()
-
Field Details
-
refCnt
-
closed
-
mslabs
-
-
Constructor Details
-
ImmutableMemStoreLAB
-
-
Method Details
-
copyCellInto
Description copied from interface:MemStoreLABAllocates 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:
copyCellIntoin 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:
forceCopyOfBigCellIntoin interfaceMemStoreLAB
-
getNewExternalChunk
- Specified by:
getNewExternalChunkin interfaceMemStoreLAB
-
getNewExternalChunk
- Specified by:
getNewExternalChunkin interfaceMemStoreLAB
-
close
Description copied from interface:MemStoreLABClose instance since it won't be used any more, try to put the chunks back to pool- Specified by:
closein interfaceMemStoreLAB
-
closeMSLABs
-
incScannerCount
Description copied from interface:MemStoreLABCalled when opening a scanner on the data of this MemStoreLAB- Specified by:
incScannerCountin interfaceMemStoreLAB
-
decScannerCount
Description copied from interface:MemStoreLABCalled when closing a scanner on the data of this MemStoreLAB- Specified by:
decScannerCountin interfaceMemStoreLAB
-
isOnHeap
- Specified by:
isOnHeapin interfaceMemStoreLAB
-
isOffHeap
- Specified by:
isOffHeapin interfaceMemStoreLAB
-
getRefCntValue
int getRefCntValue() -
isClosed
boolean isClosed()
-