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

Brahma Reddy Battula commented on YARN-3192:
--------------------------------------------

Thanks a lot [~ste...@apache.org] and [~chris.douglas] for taking look into 
this issue and giving your views..

The worst thing you can do with InterruptedException is swallow it -- catch it 
and neither rethrow it nor reassert the thread's interrupted status.  *The 
standard approach to dealing with an exception you didn't plan for -- catch it 
and log it  -- also counts as swallowing the interruption because code higher 
up on the call stack won't be able to find out about it..* 

I referred following link..

http://stackoverflow.com/questions/1087475/when-does-javas-thread-sleep-throw-interruptedexception

http://www.ibm.com/developerworks/java/library/j-jtp05236/index.html?ca=drs-





> Empty handler for exception: java.lang.InterruptedException #WebAppProxy.java 
> and #/ResourceManager.java
> --------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-3192
>                 URL: https://issues.apache.org/jira/browse/YARN-3192
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 2.6.0
>            Reporter: Brahma Reddy Battula
>            Assignee: Brahma Reddy Battula
>         Attachments: YARN-3192.patch
>
>
> The InterruptedException is completely ignored. As a result, any events 
> causing this interrupt will be lost.
>  File: org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java
> {code}
>    try {
>             event = eventQueue.take();
>           } catch (InterruptedException e) {
>             LOG.error("Returning, interrupted : " + e);
>             return; // TODO: Kill RM.
>           }
> {code}
> File: "org/apache/hadoop/yarn/server/webproxy/WebAppProxy.java"
> {code}
> public void join() {
>     if(proxyServer != null) {
>       try {
>         proxyServer.join();
>       } catch (InterruptedException e) {
>       }
>     }
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to