You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/28 08:48:02 UTC

[GitHub] [flink] zentol commented on a diff in pull request #19567: [FLINK-27382][runtime] Moves cluster shutdown to when the job cleanup is done in job mode

zentol commented on code in PR #19567:
URL: https://github.com/apache/flink/pull/19567#discussion_r860641365


##########
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/Dispatcher.java:
##########
@@ -659,14 +661,36 @@ private CompletableFuture<CleanupJobState> handleJobManagerRunnerResult(
         return jobReachedTerminalState(jobManagerRunnerResult.getExecutionGraphInfo());
     }
 
-    enum CleanupJobState {
-        LOCAL,
-        GLOBAL
+    private static class CleanupJobStateWithJobStatusIfGlobal {
+
+        private static final CleanupJobStateWithJobStatusIfGlobal LOCAL =
+                new CleanupJobStateWithJobStatusIfGlobal(null);
+
+        @Nullable private final JobStatus jobStatus;
+
+        public static CleanupJobStateWithJobStatusIfGlobal globalCleanup(JobStatus jobStatus) {

Review Comment:
   strange that jobStatus isn't nullable here.



-- 
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: issues-unsubscribe@flink.apache.org

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