Package org.apache.drill.exec.work.batch
Class SpoolingRawBatchBuffer
java.lang.Object
org.apache.drill.exec.work.batch.BaseRawBatchBuffer<org.apache.drill.exec.work.batch.SpoolingRawBatchBuffer.RawFragmentBatchWrapper>
org.apache.drill.exec.work.batch.SpoolingRawBatchBuffer
- All Implemented Interfaces:
AutoCloseable,RawFragmentBatchProvider,RawBatchBuffer
public class SpoolingRawBatchBuffer
extends BaseRawBatchBuffer<org.apache.drill.exec.work.batch.SpoolingRawBatchBuffer.RawFragmentBatchWrapper>
This implementation of RawBatchBuffer starts writing incoming batches to disk once the buffer size reaches a threshold.
The order of the incoming buffers is maintained.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.work.batch.BaseRawBatchBuffer
BaseRawBatchBuffer.BufferQueue<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final longFields inherited from class org.apache.drill.exec.work.batch.BaseRawBatchBuffer
bufferQueue, bufferSizePerSocket, context, enableDynamicFC, outOfMemory -
Constructor Summary
ConstructorsConstructorDescriptionSpoolingRawBatchBuffer(FragmentContext context, int fragmentCount, int oppositeId, int bufferIndex, boolean enableDynamicFC) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidenqueueInner(RawFragmentBatch batch) implementation specific method to enqueue batchgetDir()voidkill(FragmentContext context) protected voidupkeep(RawFragmentBatch batch) Handle miscellaneous tasks after batch retrievalMethods inherited from class org.apache.drill.exec.work.batch.BaseRawBatchBuffer
enqueue, getFragmentCount, getNext, isTerminated
-
Field Details
-
ALLOCATOR_INITIAL_RESERVATION
public static final long ALLOCATOR_INITIAL_RESERVATION- See Also:
-
ALLOCATOR_MAX_RESERVATION
public static final long ALLOCATOR_MAX_RESERVATION- See Also:
-
-
Constructor Details
-
SpoolingRawBatchBuffer
public SpoolingRawBatchBuffer(FragmentContext context, int fragmentCount, int oppositeId, int bufferIndex, boolean enableDynamicFC)
-
-
Method Details
-
getDir
-
enqueueInner
Description copied from class:BaseRawBatchBufferimplementation specific method to enqueue batch- Specified by:
enqueueInnerin classBaseRawBatchBuffer<org.apache.drill.exec.work.batch.SpoolingRawBatchBuffer.RawFragmentBatchWrapper>- Parameters:
batch-- Throws:
IOException
-
kill
- Specified by:
killin interfaceRawFragmentBatchProvider- Overrides:
killin classBaseRawBatchBuffer<org.apache.drill.exec.work.batch.SpoolingRawBatchBuffer.RawFragmentBatchWrapper>
-
upkeep
Description copied from class:BaseRawBatchBufferHandle miscellaneous tasks after batch retrieval- Specified by:
upkeepin classBaseRawBatchBuffer<org.apache.drill.exec.work.batch.SpoolingRawBatchBuffer.RawFragmentBatchWrapper>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRawFragmentBatchProvider- Overrides:
closein classBaseRawBatchBuffer<org.apache.drill.exec.work.batch.SpoolingRawBatchBuffer.RawFragmentBatchWrapper>
-