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
ConstructorsConstructorDescriptionOutgoingRecordBatch(OperatorStats stats, HashPartitionSender operator, AccountingDataTunnel tunnel, FragmentContext context, BufferAllocator allocator, int oppositeMinorFragmentId) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()protected voidcopy(int inIndex) protected voiddoEval(int inIndex, int outIndex) protected voiddoSetup(RecordBatch incoming, VectorAccessible outgoing) voidflush(boolean schemaChanged) intGet the number of records.Get the schema of the current RecordBatch.longgetValueAccessorById(Class<?> clazz, int... fieldIds) getValueVectorId(SchemaPath path) Get the value vector type and id for the given schema path.voidInitialize the OutgoingBatch based on the current schema in incoming RecordBatchiterator()voidvoidvoidvoidupdateStats(FragmentWritableBatch writableBatch) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
terminatein 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:VectorAccessibleGet the schema of the current RecordBatch. This changes if and only if a *_NEW_SCHEMA IterOutcome is provided.- Specified by:
getSchemain interfaceVectorAccessible- Returns:
- schema of the current batch
-
getRecordCount
public int getRecordCount()Description copied from interface:VectorAccessibleGet the number of records.- Specified by:
getRecordCountin interfaceVectorAccessible- Returns:
- number of records
-
getTotalRecords
public long getTotalRecords()- Specified by:
getTotalRecordsin interfacePartitionOutgoingBatch
-
getValueVectorId
Description copied from interface:VectorAccessibleGet 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:
getValueVectorIdin 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:
getValueAccessorByIdin interfaceVectorAccessible
-
iterator
- Specified by:
iteratorin interfaceIterable<VectorWrapper<?>>
-
getSelectionVector2
- Specified by:
getSelectionVector2in interfaceVectorAccessible
-
getSelectionVector4
- Specified by:
getSelectionVector4in interfaceVectorAccessible
-
getWritableBatch
-
clear
public void clear()
-