wangyang0918 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_r344667974
 
 

 ##########
 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:
   `stopContainerAsync` will not throw any exception. If stop failed, 
`onStartContainerError` will be called.
   We catch the exception when 'startContainerAsync' just because 
`createTaskExecutorLaunchContext` may throw an exception.

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