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
Modifier and TypeFieldDescriptionstatic final long
static final long
Fields inherited from class org.apache.drill.exec.work.batch.BaseRawBatchBuffer
bufferQueue, bufferSizePerSocket, context, enableDynamicFC, outOfMemory
-
Constructor Summary
ConstructorDescriptionSpoolingRawBatchBuffer
(FragmentContext context, int fragmentCount, int oppositeId, int bufferIndex, boolean enableDynamicFC) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
enqueueInner
(RawFragmentBatch batch) implementation specific method to enqueue batchgetDir()
void
kill
(FragmentContext context) protected void
upkeep
(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:BaseRawBatchBuffer
implementation specific method to enqueue batch- Specified by:
enqueueInner
in classBaseRawBatchBuffer<org.apache.drill.exec.work.batch.SpoolingRawBatchBuffer.RawFragmentBatchWrapper>
- Throws:
IOException
-
kill
- Specified by:
kill
in interfaceRawFragmentBatchProvider
- Overrides:
kill
in classBaseRawBatchBuffer<org.apache.drill.exec.work.batch.SpoolingRawBatchBuffer.RawFragmentBatchWrapper>
-
upkeep
Description copied from class:BaseRawBatchBuffer
Handle miscellaneous tasks after batch retrieval- Specified by:
upkeep
in classBaseRawBatchBuffer<org.apache.drill.exec.work.batch.SpoolingRawBatchBuffer.RawFragmentBatchWrapper>
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceRawFragmentBatchProvider
- Overrides:
close
in classBaseRawBatchBuffer<org.apache.drill.exec.work.batch.SpoolingRawBatchBuffer.RawFragmentBatchWrapper>
-