Interface SchedulingStrategy
-
- All Known Implementing Classes:
PipelinedRegionSchedulingStrategy
,VertexwiseSchedulingStrategy
public interface SchedulingStrategy
Component which encapsulates the scheduling logic. It can react to execution state changes and partition consumable events. Moreover, it is responsible for resolving task failures.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
onExecutionStateChange(ExecutionVertexID executionVertexId, ExecutionState executionState)
Called whenever anExecution
changes its state.void
onPartitionConsumable(IntermediateResultPartitionID resultPartitionId)
Called whenever anIntermediateResultPartition
becomes consumable.void
restartTasks(Set<ExecutionVertexID> verticesToRestart)
Called whenever vertices need to be restarted (due to task failure).default void
scheduleAllVerticesIfPossible()
Schedules all vertices and excludes any vertices that are already finished or whose inputs are not yet ready.void
startScheduling()
Called when the scheduling is started (initial scheduling operation).
-
-
-
Method Detail
-
startScheduling
void startScheduling()
Called when the scheduling is started (initial scheduling operation).
-
restartTasks
void restartTasks(Set<ExecutionVertexID> verticesToRestart)
Called whenever vertices need to be restarted (due to task failure).- Parameters:
verticesToRestart
- The tasks need to be restarted
-
onExecutionStateChange
void onExecutionStateChange(ExecutionVertexID executionVertexId, ExecutionState executionState)
Called whenever anExecution
changes its state.- Parameters:
executionVertexId
- The id of the taskexecutionState
- The new state of the execution
-
onPartitionConsumable
void onPartitionConsumable(IntermediateResultPartitionID resultPartitionId)
Called whenever anIntermediateResultPartition
becomes consumable.- Parameters:
resultPartitionId
- The id of the result partition
-
scheduleAllVerticesIfPossible
default void scheduleAllVerticesIfPossible()
Schedules all vertices and excludes any vertices that are already finished or whose inputs are not yet ready.
-
-