Search in sources :

Example 6 with HashPartitionSender

use of org.apache.drill.exec.physical.config.HashPartitionSender in project drill by apache.

the class RangePartitionSenderCreator method getRoot.

@Override
public RootExec getRoot(ExecutorFragmentContext context, RangePartitionSender config, List<RecordBatch> children) throws ExecutionSetupException {
    Preconditions.checkArgument(children.size() == 1);
    RangePartitionRecordBatch rangep = new RangePartitionRecordBatch(config, children.iterator().next(), context);
    HashPartitionSender hpc = new HashPartitionSender(config.getOppositeMajorFragmentId(), config, config.getPartitionFunction().getPartitionFieldRef(), config.getDestinations(), RangePartitionSender.RANGE_PARTITION_OUTGOING_BATCH_SIZE);
    return new PartitionSenderRootExec(context, rangep, hpc);
}
Also used : HashPartitionSender(org.apache.drill.exec.physical.config.HashPartitionSender) PartitionSenderRootExec(org.apache.drill.exec.physical.impl.partitionsender.PartitionSenderRootExec)

Aggregations

HashPartitionSender (org.apache.drill.exec.physical.config.HashPartitionSender)6 PartitionSenderRootExec (org.apache.drill.exec.physical.impl.partitionsender.PartitionSenderRootExec)4 IOException (java.io.IOException)2 List (java.util.List)2 FragmentContextImpl (org.apache.drill.exec.ops.FragmentContextImpl)2 MinorFragmentEndpoint (org.apache.drill.exec.physical.MinorFragmentEndpoint)2 PlanFragment (org.apache.drill.exec.proto.BitControl.PlanFragment)2 QueryContextInformation (org.apache.drill.exec.proto.BitControl.QueryContextInformation)2 MetricValue (org.apache.drill.exec.proto.UserBitShared.MetricValue)2 VectorAccessible (org.apache.drill.exec.record.VectorAccessible)2 OptionList (org.apache.drill.exec.server.options.OptionList)2 QueryWorkUnit (org.apache.drill.exec.work.QueryWorkUnit)2 ExecutionException (java.util.concurrent.ExecutionException)1 RecordBatch (org.apache.drill.exec.record.RecordBatch)1 MockExecutorState (org.apache.drill.test.OperatorFixture.MockExecutorState)1