tillrohrmann commented on a change in pull request #9808: [FLINK-14281] Add 
DispatcherRunner#getShutDownFuture
URL: https://github.com/apache/flink/pull/9808#discussion_r329967269
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/component/DispatcherResourceManagerComponent.java
 ##########
 @@ -88,25 +88,7 @@
        }
 
        private void registerShutDownFuture() {
-               terminationFuture.whenComplete(
-                       (aVoid, throwable) -> {
-                               if (throwable != null) {
-                                       
shutDownFuture.completeExceptionally(throwable);
-                               } else {
-                                       
shutDownFuture.complete(ApplicationStatus.SUCCEEDED);
-                               }
-                       });
-
-               dispatcherRunner
-                       .getTerminationFuture()
-                       .whenComplete(
-                               (aVoid, throwable) -> {
-                                       if (throwable != null) {
-                                               
shutDownFuture.completeExceptionally(throwable);
-                                       } else {
-                                               
shutDownFuture.complete(ApplicationStatus.SUCCEEDED);
-                                       }
-                               });
+               FutureUtils.forward(dispatcherRunner.getShutDownFuture(), 
shutDownFuture);
 
 Review comment:
   Sorry I meant the `DispatcherRunner`.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to