public class PartitionerTemplate.OutgoingRecordBatch extends Object implements PartitionOutgoingBatch, VectorAccessible
Constructor and Description |
---|
OutgoingRecordBatch(OperatorStats stats,
HashPartitionSender operator,
AccountingDataTunnel tunnel,
FragmentContext context,
BufferAllocator allocator,
int oppositeMinorFragmentId) |
Modifier and Type | Method and Description |
---|---|
void |
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 |
getRecordCount()
Get the number of records.
|
BatchSchema |
getSchema()
Get the schema of the current RecordBatch.
|
SelectionVector2 |
getSelectionVector2() |
SelectionVector4 |
getSelectionVector4() |
long |
getTotalRecords() |
VectorWrapper<?> |
getValueAccessorById(Class<?> clazz,
int... fieldIds) |
TypedFieldId |
getValueVectorId(SchemaPath path)
Get the value vector type and id for the given schema path.
|
WritableBatch |
getWritableBatch() |
void |
initializeBatch()
Initialize the OutgoingBatch based on the current schema in incoming RecordBatch
|
Iterator<VectorWrapper<?>> |
iterator() |
void |
resetBatch() |
void |
setIsLast() |
void |
terminate() |
void |
updateStats(FragmentWritableBatch writableBatch) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public OutgoingRecordBatch(OperatorStats stats, HashPartitionSender operator, AccountingDataTunnel tunnel, FragmentContext context, BufferAllocator allocator, int oppositeMinorFragmentId)
protected void copy(int inIndex) throws IOException
IOException
public void terminate()
terminate
in interface PartitionOutgoingBatch
protected void doSetup(@Named(value="incoming") RecordBatch incoming, @Named(value="outgoing") VectorAccessible outgoing) throws SchemaChangeException
SchemaChangeException
protected void doEval(@Named(value="inIndex") int inIndex, @Named(value="outIndex") int outIndex) throws SchemaChangeException
SchemaChangeException
public void flush(boolean schemaChanged) throws IOException
IOException
public void updateStats(FragmentWritableBatch writableBatch)
public void initializeBatch()
public void resetBatch()
public void setIsLast()
public BatchSchema getSchema()
VectorAccessible
getSchema
in interface VectorAccessible
public int getRecordCount()
VectorAccessible
getRecordCount
in interface VectorAccessible
public long getTotalRecords()
getTotalRecords
in interface PartitionOutgoingBatch
public TypedFieldId getValueVectorId(SchemaPath path)
VectorAccessible
Iterable<ValueVector>.
getValueVectorId
in interface VectorAccessible
path
- the path where the vector should be located.public VectorWrapper<?> getValueAccessorById(Class<?> clazz, int... fieldIds)
getValueAccessorById
in interface VectorAccessible
public Iterator<VectorWrapper<?>> iterator()
iterator
in interface Iterable<VectorWrapper<?>>
public SelectionVector2 getSelectionVector2()
getSelectionVector2
in interface VectorAccessible
public SelectionVector4 getSelectionVector4()
getSelectionVector4
in interface VectorAccessible
public WritableBatch getWritableBatch()
public void clear()
Copyright © 1970 The Apache Software Foundation. All rights reserved.