dmvk commented on a change in pull request #18443:
URL: https://github.com/apache/flink/pull/18443#discussion_r793639286
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
##########
@@ -511,9 +511,8 @@ public void deploy() throws JobException {
}
// make sure exactly one deployment call happens from the correct state
- // note: the transition from CREATED to DEPLOYING is for testing
purposes only
ExecutionState previous = this.state;
- if (previous == SCHEDULED || previous == CREATED) {
Review comment:
I'm wondering whether it would make sense to define valid transitions in
the `ExecutionState` and then have something along the lines of
`ExecutionState#isAllowedToTransitionTo(ExecutionState)`. That would introduce
a single place with the state machine definition that could guard the contract
🤔.
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/CreatingExecutionGraph.java
##########
@@ -79,6 +81,11 @@ private void handleExecutionGraphCreation(
throwable);
context.goToFinished(context.getArchivedExecutionGraph(JobStatus.FAILED,
throwable));
} else {
+ for (ExecutionVertex vertex :
+
executionGraphWithVertexParallelism.executionGraph.getAllExecutionVertices()) {
Review comment:
This seems to be in line with the default scheduler 👍. If I understand
that correctly scheduled basically means, I know where these vertices will be
executed, but I haven't told the TMs yet (which is covered by the DEPLOYED
state), is that correct?
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/CreatingExecutionGraph.java
##########
@@ -79,6 +81,11 @@ private void handleExecutionGraphCreation(
throwable);
context.goToFinished(context.getArchivedExecutionGraph(JobStatus.FAILED,
throwable));
} else {
Review comment:
OT: A sanity check would make sense here
```suggestion
} else {
Objects.requireNonNull(executionGraphWithVertexParallelism,
"...");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]