Package io.trino.execution.scheduler
Class SourcePartitionedScheduler
- java.lang.Object
-
- io.trino.execution.scheduler.SourcePartitionedScheduler
-
- All Implemented Interfaces:
SourceScheduler
public class SourcePartitionedScheduler extends Object implements SourceScheduler
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()List<Lifespan>drainCompletedLifespans()PlanNodeIdgetPlanNodeId()static SourceSchedulernewSourcePartitionedSchedulerAsSourceScheduler(PipelinedStageExecution stageExecution, PlanNodeId partitionedNode, SplitSource splitSource, SplitPlacementPolicy splitPlacementPolicy, int splitBatchSize, boolean groupedExecution, DynamicFilterService dynamicFilterService, TableExecuteContextManager tableExecuteContextManager, BooleanSupplier anySourceTaskBlocked, PartitionIdAllocator partitionIdAllocator, Map<InternalNode,RemoteTask> scheduledTasks)Obtains aSourceSchedulersuitable for use in FixedSourcePartitionedScheduler.static StageSchedulernewSourcePartitionedSchedulerAsStageScheduler(PipelinedStageExecution stageExecution, PlanNodeId partitionedNode, SplitSource splitSource, SplitPlacementPolicy splitPlacementPolicy, int splitBatchSize, DynamicFilterService dynamicFilterService, TableExecuteContextManager tableExecuteContextManager, BooleanSupplier anySourceTaskBlocked)Obtains an instance ofSourcePartitionedSchedulersuitable for use as a stage scheduler.voidnoMoreLifespans()ScheduleResultschedule()voidstartLifespan(Lifespan lifespan, ConnectorPartitionHandle partitionHandle)
-
-
-
Method Detail
-
getPlanNodeId
public PlanNodeId getPlanNodeId()
- Specified by:
getPlanNodeIdin interfaceSourceScheduler
-
newSourcePartitionedSchedulerAsStageScheduler
public static StageScheduler newSourcePartitionedSchedulerAsStageScheduler(PipelinedStageExecution stageExecution, PlanNodeId partitionedNode, SplitSource splitSource, SplitPlacementPolicy splitPlacementPolicy, int splitBatchSize, DynamicFilterService dynamicFilterService, TableExecuteContextManager tableExecuteContextManager, BooleanSupplier anySourceTaskBlocked)
Obtains an instance ofSourcePartitionedSchedulersuitable for use as a stage scheduler.This returns an ungrouped
SourcePartitionedSchedulerthat requires minimal management from the caller, which is ideal for use as a stage scheduler.
-
newSourcePartitionedSchedulerAsSourceScheduler
public static SourceScheduler newSourcePartitionedSchedulerAsSourceScheduler(PipelinedStageExecution stageExecution, PlanNodeId partitionedNode, SplitSource splitSource, SplitPlacementPolicy splitPlacementPolicy, int splitBatchSize, boolean groupedExecution, DynamicFilterService dynamicFilterService, TableExecuteContextManager tableExecuteContextManager, BooleanSupplier anySourceTaskBlocked, PartitionIdAllocator partitionIdAllocator, Map<InternalNode,RemoteTask> scheduledTasks)
Obtains aSourceSchedulersuitable for use in FixedSourcePartitionedScheduler.This returns a
SourceSchedulerthat can be used for a pipeline that is either ungrouped or grouped. However, the caller is responsible initializing the driver groups in this scheduler accordingly.Besides, the caller is required to poll
drainCompletedLifespans()in addition toschedule()on the returned object. Otherwise, lifecycle transitioning of the object will not work properly.
-
startLifespan
public void startLifespan(Lifespan lifespan, ConnectorPartitionHandle partitionHandle)
- Specified by:
startLifespanin interfaceSourceScheduler
-
noMoreLifespans
public void noMoreLifespans()
- Specified by:
noMoreLifespansin interfaceSourceScheduler
-
schedule
public ScheduleResult schedule()
- Specified by:
schedulein interfaceSourceScheduler
-
close
public void close()
- Specified by:
closein interfaceSourceScheduler
-
drainCompletedLifespans
public List<Lifespan> drainCompletedLifespans()
- Specified by:
drainCompletedLifespansin interfaceSourceScheduler
-
-