use of org.apache.drill.exec.work.batch.IncomingBuffers in project drill by axbaretto.
the class UnorderedReceiverCreator method getBatch.
@SuppressWarnings("resource")
@Override
public UnorderedReceiverBatch getBatch(ExecutorFragmentContext context, UnorderedReceiver receiver, List<RecordBatch> children) throws ExecutionSetupException {
assert children == null || children.isEmpty();
IncomingBuffers bufHolder = context.getBuffers();
assert bufHolder != null : "IncomingBuffers must be defined for any place a receiver is declared.";
RawBatchBuffer[] buffers = bufHolder.getBuffers(receiver.getOppositeMajorFragmentId());
assert buffers.length == 1;
RawBatchBuffer buffer = buffers[0];
return new UnorderedReceiverBatch(context, buffer, receiver);
}
use of org.apache.drill.exec.work.batch.IncomingBuffers in project drill by apache.
the class MergingReceiverCreator method getBatch.
@Override
public MergingRecordBatch getBatch(ExecutorFragmentContext context, MergingReceiverPOP receiver, List<RecordBatch> children) throws ExecutionSetupException, OutOfMemoryException {
assert children == null || children.isEmpty();
IncomingBuffers bufHolder = context.getBuffers();
assert bufHolder != null : "IncomingBuffers must be defined for any place a receiver is declared.";
RawBatchBuffer[] buffers = bufHolder.getCollector(receiver.getOppositeMajorFragmentId()).getBuffers();
return new MergingRecordBatch(context, receiver, buffers);
}
Aggregations