Package io.trino.execution.scheduler
Class SourcePartitionedScheduler
java.lang.Object
io.trino.execution.scheduler.SourcePartitionedScheduler
- All Implemented Interfaces:
SourceScheduler
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static SourceSchedulernewSourcePartitionedSchedulerAsSourceScheduler(StageExecution 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(StageExecution 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.voidschedule()voidstartLifespan(Lifespan lifespan, ConnectorPartitionHandle partitionHandle)
-
Method Details
-
getPlanNodeId
- Specified by:
getPlanNodeIdin interfaceSourceScheduler
-
newSourcePartitionedSchedulerAsStageScheduler
public static StageScheduler newSourcePartitionedSchedulerAsStageScheduler(StageExecution 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(StageExecution 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
- Specified by:
startLifespanin interfaceSourceScheduler
-
noMoreLifespans
public void noMoreLifespans()- Specified by:
noMoreLifespansin interfaceSourceScheduler
-
schedule
- Specified by:
schedulein interfaceSourceScheduler
-
close
public void close()- Specified by:
closein interfaceSourceScheduler
-
drainCompletedLifespans
- Specified by:
drainCompletedLifespansin interfaceSourceScheduler
-