flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] rmetzger commented on a change in pull request #15884: [FLINK-22266] Fix stop-with-savepoint operation in AdaptiveScheduler
Date Thu, 20 May 2021 07:08:29 GMT

rmetzger commented on a change in pull request #15884:
URL: https://github.com/apache/flink/pull/15884#discussion_r635823536



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/Executing.java
##########
@@ -59,9 +69,17 @@
         super(context, executionGraph, executionGraphHandler, operatorCoordinatorHandler,
logger);
         this.context = context;
         this.userCodeClassLoader = userCodeClassLoader;
+        Preconditions.checkState(
+                executionGraph.getState() == JobStatus.RUNNING, "Assuming running execution
graph");
 
-        deploy();
-
+        if (executingStateBehavior == Behavior.DEPLOY_ON_ENTER) {
+            onAllExecutionVertexes(this::deploySafely);
+        } else if (executingStateBehavior == Behavior.EXPECT_RUNNING) {
+            onAllExecutionVertexes(this::expectRunning);
+        } else {
+            throw new IllegalStateException(
+                    "Unexpected executing state behavior " + executingStateBehavior);
+        }

Review comment:
       Indeed, that's a good simplification. I pushed a commit addressing this item.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message