[ 
https://issues.apache.org/jira/browse/YARN-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13713159#comment-13713159
 ] 

Xuan Gong commented on YARN-875:
--------------------------------

Currently, if callback handler has exception, this thread will stop. But 
applicationMaster will keep running. We try to stop ApplicationMaster if 
callback handler has exception. That is why we add a try..catch block, and at 
catch block, we call handler.onError().

And calling stop() inside onError() is not required, it is the recommended 
action. If it call stop() inside onError(), that is fine, too. Eventually, 
AMRMClientAsync will call unregisterApplicationMaster and set keepRunning flag 
to false which will stop the heartBeat thread. But it is good to let heartBeat 
thread stop earlier.
                
> Application can hang if AMRMClientAsync callback thread has exception
> ---------------------------------------------------------------------
>
>                 Key: YARN-875
>                 URL: https://issues.apache.org/jira/browse/YARN-875
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 2.1.0-beta
>            Reporter: Bikas Saha
>            Assignee: Xuan Gong
>         Attachments: YARN-875.1.patch, YARN-875.1.patch, YARN-875.2.patch, 
> YARN-875.3.patch
>
>
> Currently that thread will die and then never callback. App can hang. 
> Possible solution could be to catch Throwable in the callback and then call 
> client.onError().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to