Class PartitionerTemplate
java.lang.Object
org.apache.drill.exec.physical.impl.partitionsender.PartitionerTemplate
- All Implemented Interfaces:
- Partitioner
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsFields inherited from interface org.apache.drill.exec.physical.impl.partitionsender.PartitionerTEMPLATE_DEFINITION
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()abstract intdoEval(int inIndex) abstract voiddoSetup(FragmentContext context, RecordBatch incoming, PartitionerTemplate.OutgoingRecordBatch[] outgoing) voidflushOutgoingBatches(boolean isLastBatch, boolean schemaChanged) Flush each outgoing record batch, and optionally reset the state of each outgoing record batch (on schema change).getOutgoingBatch(int index) Get PartitionOutgoingBatch based on the fact that there can be > 1 PartitionerList<? extends PartitionOutgoingBatch> getStats()voidprotected PartitionerTemplate.OutgoingRecordBatchinjectMembers(PartitionerTemplate.OutgoingRecordBatch outgoingRecordBatch) protected PartitionerTemplate.OutgoingRecordBatchnewOutgoingRecordBatch(OperatorStats stats, HashPartitionSender operator, AccountingDataTunnel tunnel, FragmentContext context, BufferAllocator allocator, int oppositeMinorFragmentId) Shim method to be overridden in plain-old Java mode by the subclass to instantiate the generated inner class.voidpartitionBatch(RecordBatch incoming) final voidsetup(ExchangeFragmentContext context, RecordBatch incoming, HashPartitionSender popConfig, OperatorStats stats, OperatorContext oContext, ClassGenerator<?> cg, int start, int end) 
- 
Field Details- 
cg
- 
context
 
- 
- 
Constructor Details- 
PartitionerTemplatepublic PartitionerTemplate()
 
- 
- 
Method Details- 
getOutgoingBatches- Specified by:
- getOutgoingBatchesin interface- Partitioner
 
- 
getOutgoingBatchDescription copied from interface:PartitionerGet PartitionOutgoingBatch based on the fact that there can be > 1 Partitioner- Specified by:
- getOutgoingBatchin interface- Partitioner
- Parameters:
- index-
- Returns:
- PartitionOutgoingBatch that matches index within Partitioner. This method can return null if index does not fall within boundary of this Partitioner
 
- 
setuppublic final void setup(ExchangeFragmentContext context, RecordBatch incoming, HashPartitionSender popConfig, OperatorStats stats, OperatorContext oContext, ClassGenerator<?> cg, int start, int end) throws SchemaChangeException - Specified by:
- setupin interface- Partitioner
- Throws:
- SchemaChangeException
 
- 
newOutgoingRecordBatchprotected PartitionerTemplate.OutgoingRecordBatch newOutgoingRecordBatch(OperatorStats stats, HashPartitionSender operator, AccountingDataTunnel tunnel, FragmentContext context, BufferAllocator allocator, int oppositeMinorFragmentId) Shim method to be overridden in plain-old Java mode by the subclass to instantiate the generated inner class. Byte-code manipulation appears to fix up the byte codes directly. The name is special, it must be "new" + inner class name.
- 
injectMembersprotected PartitionerTemplate.OutgoingRecordBatch injectMembers(PartitionerTemplate.OutgoingRecordBatch outgoingRecordBatch) 
- 
getStats- Specified by:
- getStatsin interface- Partitioner
 
- 
flushOutgoingBatchesFlush each outgoing record batch, and optionally reset the state of each outgoing record batch (on schema change). Note that the schema is updated based on incoming at the time this function is invoked.- Specified by:
- flushOutgoingBatchesin interface- Partitioner
- Parameters:
- isLastBatch- true if this is the last incoming batch
- schemaChanged- true if the schema has changed
- Throws:
- IOException
 
- 
partitionBatch- Specified by:
- partitionBatchin interface- Partitioner
- Throws:
- IOException
 
- 
initializepublic void initialize()- Specified by:
- initializein interface- Partitioner
 
- 
clearpublic void clear()- Specified by:
- clearin interface- Partitioner
 
- 
doSetuppublic abstract void doSetup(@Named("context") FragmentContext context, @Named("incoming") RecordBatch incoming, @Named("outgoing") PartitionerTemplate.OutgoingRecordBatch[] outgoing) throws SchemaChangeException - Throws:
- SchemaChangeException
 
- 
doEval- Throws:
- SchemaChangeException
 
 
-