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

Zhijie Shen commented on YARN-2937:
-----------------------------------

[~varun_saxena], thanks for your explanation, which makes sense to me. Again, 
this patch doesn't apply too. Please kindly update it. And there's one 
additional comment.

The 
[document|http://docs.oracle.com/javase/7/docs/api/java/io/PrintWriter.html] 
says {{Methods in this class never throw I/O exceptions, although some of its 
constructors may. The client may inquire as to whether any errors have occurred 
by invoking checkError().}} Previously if I/O error occurs, we will always 
throw exception. Now some errors will be just recorded as WARN logs. IMHO, we 
should throw IOException here.
{code}
+        if(pw.checkError()) {
+          LOG.warn("Error while closing cgroup file " + path);
{code}

> Fix new findbugs warnings in hadoop-yarn-nodemanager
> ----------------------------------------------------
>
>                 Key: YARN-2937
>                 URL: https://issues.apache.org/jira/browse/YARN-2937
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Varun Saxena
>            Assignee: Varun Saxena
>             Fix For: 2.7.0
>
>         Attachments: YARN-2937.001.patch, YARN-2937.002.patch, 
> YARN-2937.003.patch, YARN-2937.004.patch
>
>




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

Reply via email to