Package org.apache.hadoop.hbase.io
Class DeallocateRewriteByteBuffAllocator
java.lang.Object
org.apache.hadoop.hbase.io.ByteBuffAllocator
org.apache.hadoop.hbase.io.DeallocateRewriteByteBuffAllocator
A ByteBuffAllocator that rewrite the bytebuffers right after released. It can be used for test
whether there are prematurely releasing backing bytebuffers.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.io.ByteBuffAllocator
ByteBuffAllocator.Recycler
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.io.ByteBuffAllocator
ALLOCATOR_POOL_ENABLED_KEY, BUFFER_SIZE_KEY, bufSize, BYTEBUFF_ALLOCATOR_CLASS, DEFAULT_BUFFER_SIZE, DEPRECATED_ALLOCATOR_POOL_ENABLED_KEY, DEPRECATED_BUFFER_SIZE_KEY, DEPRECATED_MAX_BUFFER_COUNT_KEY, HEAP, MAX_BUFFER_COUNT_KEY, MIN_ALLOCATE_SIZE_KEY, NONE, reservoirEnabled
-
Constructor Summary
ConstructorDescriptionDeallocateRewriteByteBuffAllocator
(boolean reservoirEnabled, int maxBufCount, int bufSize, int minSizeForReservoirUse) -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[]
generateTmpBytes
(int length) protected void
putbackBuffer
(ByteBuffer buf) Return back a ByteBuffer after its use.Methods inherited from class org.apache.hadoop.hbase.io.ByteBuffAllocator
allocate, allocateOneBuffer, clean, create, getBufferSize, getFreeBufferCount, getHeapAllocationBytes, getHeapAllocationBytes, getHeapAllocationRatio, getPoolAllocationBytes, getTotalBufferCount, getUsedBufferCount, isReservoirEnabled
-
Field Details
-
LOG
-
-
Constructor Details
-
DeallocateRewriteByteBuffAllocator
DeallocateRewriteByteBuffAllocator(boolean reservoirEnabled, int maxBufCount, int bufSize, int minSizeForReservoirUse)
-
-
Method Details
-
putbackBuffer
Description copied from class:ByteBuffAllocator
Return back a ByteBuffer after its use. Don't read/write the ByteBuffer after the returning.- Overrides:
putbackBuffer
in classByteBuffAllocator
- Parameters:
buf
- ByteBuffer to return.
-
generateTmpBytes
-