public class VertexwiseSchedulingStrategy extends Object implements SchedulingStrategy, SchedulingTopologyListener
SchedulingStrategy instance which schedules tasks in granularity of vertex (which
indicates this strategy only supports batch jobs). Note that this strategy implements SchedulingTopologyListener, so it can handle the updates of scheduling topology.| 限定符和类型 | 类和说明 |
|---|---|
static class |
VertexwiseSchedulingStrategy.Factory
The factory for creating
VertexwiseSchedulingStrategy. |
| 构造器和说明 |
|---|
VertexwiseSchedulingStrategy(SchedulerOperations schedulerOperations,
SchedulingTopology schedulingTopology,
InputConsumableDecider.Factory inputConsumableDeciderFactory) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
notifySchedulingTopologyUpdated(SchedulingTopology schedulingTopology,
List<ExecutionVertexID> newExecutionVertices)
Notifies that the scheduling topology is just updated.
|
void |
onExecutionStateChange(ExecutionVertexID executionVertexId,
ExecutionState executionState)
Called whenever an
Execution changes its state. |
void |
onPartitionConsumable(IntermediateResultPartitionID resultPartitionId)
Called whenever an
IntermediateResultPartition becomes consumable. |
void |
restartTasks(Set<ExecutionVertexID> verticesToRestart)
Called whenever vertices need to be restarted (due to task failure).
|
void |
startScheduling()
Called when the scheduling is started (initial scheduling operation).
|
public VertexwiseSchedulingStrategy(SchedulerOperations schedulerOperations, SchedulingTopology schedulingTopology, InputConsumableDecider.Factory inputConsumableDeciderFactory)
public void startScheduling()
SchedulingStrategystartScheduling 在接口中 SchedulingStrategypublic void restartTasks(Set<ExecutionVertexID> verticesToRestart)
SchedulingStrategyrestartTasks 在接口中 SchedulingStrategyverticesToRestart - The tasks need to be restartedpublic void onExecutionStateChange(ExecutionVertexID executionVertexId, ExecutionState executionState)
SchedulingStrategyExecution changes its state.onExecutionStateChange 在接口中 SchedulingStrategyexecutionVertexId - The id of the taskexecutionState - The new state of the executionpublic void onPartitionConsumable(IntermediateResultPartitionID resultPartitionId)
SchedulingStrategyIntermediateResultPartition becomes consumable.onPartitionConsumable 在接口中 SchedulingStrategyresultPartitionId - The id of the result partitionpublic void notifySchedulingTopologyUpdated(SchedulingTopology schedulingTopology, List<ExecutionVertexID> newExecutionVertices)
SchedulingTopologyListenernotifySchedulingTopologyUpdated 在接口中 SchedulingTopologyListenerschedulingTopology - the scheduling topology which is just updatednewExecutionVertices - the newly added execution vertices.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.