TisonKun commented on a change in pull request #6446: [FLINK-9240] Avoid 
deprecated Akka methods
URL: https://github.com/apache/flink/pull/6446#discussion_r205955993
 
 

 ##########
 File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnApplicationMasterRunner.java
 ##########
 @@ -401,11 +406,14 @@ protected int runApplicationMaster(Configuration config) 
{
                        }
 
                        if (actorSystem != null) {
-                               try {
-                                       actorSystem.shutdown();
-                               } catch (Throwable tt) {
-                                       LOG.error("Error shutting down actor 
system", tt);
-                               }
+                               actorSystem.terminate().onComplete(
+                                       new OnComplete<Terminated>() {
+                                               public void 
onComplete(Throwable failure, Terminated result) {
+                                                       if (failure != null) {
+                                                               
LOG.error("Error shutting down actor system", failure);
+                                                       }
+                                               }
+                                       }, 
org.apache.flink.runtime.concurrent.Executors.directExecutionContext());
 
 Review comment:
   This PR looks good to me. Here are a little questions, could this be 
simplified by `import static`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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