[
https://issues.apache.org/jira/browse/YARN-2937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14257302#comment-14257302
]
Zhijie Shen commented on YARN-2937:
-----------------------------------
bq. Havent thrown Exception in code below though, as it is in finally block.
I mean we SHOULD throw the exception. Before the patch, all I/O errors here
will results in exceptions. After the patch, PrintWriter hardly throws the
exceptions, but set error flag. It means that some possible I/O error which
were supposed to be thrown before is now just be recorded as WARN log.
Therefore, instead of
{code}
+ if(pw.checkError()) {
+ LOG.warn("Error while closing cgroup file " + path);
{code}
Shall we do the following?
{code}
+ if(pw.checkError()) {
+ throw new IOException("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, YARN-2937.005.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)