Package org.apache.drill.exec.work.batch
Class BaseRawBatchBuffer<T>
java.lang.Object
org.apache.drill.exec.work.batch.BaseRawBatchBuffer<T>
- All Implemented Interfaces:
AutoCloseable,RawFragmentBatchProvider,RawBatchBuffer
- Direct Known Subclasses:
SpoolingRawBatchBuffer,UnlimitedRawBatchBuffer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BaseRawBatchBuffer.BufferQueue<T> protected final intprotected final FragmentContextprotected final booleanprotected final AtomicBoolean -
Constructor Summary
ConstructorsConstructorDescriptionBaseRawBatchBuffer(FragmentContext context, int fragmentCount, boolean enableDynamicFC) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidenqueue(RawFragmentBatch batch) Add the next new raw fragment batch to the buffer.protected abstract voidenqueueInner(RawFragmentBatch batch) implementation specific method to enqueue batchprotected intReturn the fragment count from construction time.getNext()protected booleanvoidkill(FragmentContext context) protected abstract voidupkeep(RawFragmentBatch batch) Handle miscellaneous tasks after batch retrieval
-
Field Details
-
bufferQueue
-
bufferSizePerSocket
protected final int bufferSizePerSocket -
outOfMemory
-
context
-
enableDynamicFC
protected final boolean enableDynamicFC
-
-
Constructor Details
-
BaseRawBatchBuffer
-
-
Method Details
-
getFragmentCount
protected int getFragmentCount()Return the fragment count from construction time.- Returns:
- the fragment count
-
enqueue
Description copied from interface:RawBatchBufferAdd the next new raw fragment batch to the buffer.- Specified by:
enqueuein interfaceRawBatchBuffer- Parameters:
batch- Batch to enqueue- Throws:
IOException
-
enqueueInner
implementation specific method to enqueue batch- Parameters:
batch-- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRawFragmentBatchProvider
-
kill
- Specified by:
killin interfaceRawFragmentBatchProvider
-
getNext
- Specified by:
getNextin interfaceRawFragmentBatchProvider- Throws:
IOException
-
upkeep
Handle miscellaneous tasks after batch retrieval -
isTerminated
protected boolean isTerminated()
-