TisonKun commented on a change in pull request #10143: [FLINK-13184]Starting a 
TaskExecutor blocks the YarnResourceManager's main thread
URL: https://github.com/apache/flink/pull/10143#discussion_r344592398
 
 

 ##########
 File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnResourceManager.java
 ##########
 @@ -322,11 +323,7 @@ Resource getContainerResource() {
        public boolean stopWorker(final YarnWorkerNode workerNode) {
                final Container container = workerNode.getContainer();
                log.info("Stopping container {}.", container.getId());
-               try {
-                       nodeManagerClient.stopContainer(container.getId(), 
container.getNodeId());
-               } catch (final Exception e) {
-                       log.warn("Error while calling YARN Node Manager to stop 
container", e);
-               }
+               nodeManagerClient.stopContainerAsync(container.getId(), 
container.getNodeId());
 
 Review comment:
   Well I notice `onXXX` methods below. Would you explain why we don't
   
   ```java
   try {
     ...
   } catch (Throwable t) {
     onStopContainerError(...)
   }
   ```
   
   here as we do when start container?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to