Class PartitionerTemplate.OutgoingRecordBatch
java.lang.Object
org.apache.drill.exec.physical.impl.partitionsender.PartitionerTemplate.OutgoingRecordBatch
- All Implemented Interfaces:
Iterable<VectorWrapper<?>>
,PartitionOutgoingBatch
,VectorAccessible
- Enclosing class:
- PartitionerTemplate
public class PartitionerTemplate.OutgoingRecordBatch
extends Object
implements PartitionOutgoingBatch, VectorAccessible
-
Constructor Summary
ConstructorDescriptionOutgoingRecordBatch
(OperatorStats stats, HashPartitionSender operator, AccountingDataTunnel tunnel, FragmentContext context, BufferAllocator allocator, int oppositeMinorFragmentId) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
protected void
copy
(int inIndex) protected void
doEval
(int inIndex, int outIndex) protected void
doSetup
(RecordBatch incoming, VectorAccessible outgoing) void
flush
(boolean schemaChanged) int
Get the number of records.Get the schema of the current RecordBatch.long
getValueAccessorById
(Class<?> clazz, int... fieldIds) getValueVectorId
(SchemaPath path) Get the value vector type and id for the given schema path.void
Initialize the OutgoingBatch based on the current schema in incoming RecordBatchiterator()
void
void
void
void
updateStats
(FragmentWritableBatch writableBatch) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
OutgoingRecordBatch
public OutgoingRecordBatch(OperatorStats stats, HashPartitionSender operator, AccountingDataTunnel tunnel, FragmentContext context, BufferAllocator allocator, int oppositeMinorFragmentId)
-
-
Method Details
-
copy
- Throws:
IOException
-
terminate
public void terminate()- Specified by:
terminate
in interfacePartitionOutgoingBatch
-
doSetup
protected void doSetup(@Named("incoming") RecordBatch incoming, @Named("outgoing") VectorAccessible outgoing) throws SchemaChangeException - Throws:
SchemaChangeException
-
doEval
protected void doEval(@Named("inIndex") int inIndex, @Named("outIndex") int outIndex) throws SchemaChangeException - Throws:
SchemaChangeException
-
flush
- Throws:
IOException
-
updateStats
-
initializeBatch
public void initializeBatch()Initialize the OutgoingBatch based on the current schema in incoming RecordBatch -
resetBatch
public void resetBatch() -
setIsLast
public void setIsLast() -
getSchema
Description copied from interface:VectorAccessible
Get the schema of the current RecordBatch. This changes if and only if a *_NEW_SCHEMA IterOutcome is provided.- Specified by:
getSchema
in interfaceVectorAccessible
- Returns:
- schema of the current batch
-
getRecordCount
public int getRecordCount()Description copied from interface:VectorAccessible
Get the number of records.- Specified by:
getRecordCount
in interfaceVectorAccessible
- Returns:
- number of records
-
getTotalRecords
public long getTotalRecords()- Specified by:
getTotalRecords
in interfacePartitionOutgoingBatch
-
getValueVectorId
Description copied from interface:VectorAccessible
Get the value vector type and id for the given schema path. The TypedFieldId should store a fieldId which is the same as the ordinal position of the field within the Iterator provided this classes implementation ofIterable<ValueVector>
.
- Specified by:
getValueVectorId
in interfaceVectorAccessible
- Parameters:
path
- the path where the vector should be located.- Returns:
- the local field id associated with this vector. If no field matches this path, this will return a null TypedFieldId
-
getValueAccessorById
- Specified by:
getValueAccessorById
in interfaceVectorAccessible
-
iterator
- Specified by:
iterator
in interfaceIterable<VectorWrapper<?>>
-
getSelectionVector2
- Specified by:
getSelectionVector2
in interfaceVectorAccessible
-
getSelectionVector4
- Specified by:
getSelectionVector4
in interfaceVectorAccessible
-
getWritableBatch
-
clear
public void clear()
-