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

Jim Brennan commented on YARN-7595:
-----------------------------------

The JUnit test that failed (testValidEnvVariableSubstitution) fails on trunk 
without my patch, so it is unrelated to the patch.
The checkstyle failure is another case of an empty try-with-resources block.

No new tests were added because this is fixing cases where we were not 
propagating an IOException that happens during the close() calls.  Isolating 
those failures would require pretty extensive changes.
I did run all of the existing nodemanager unit tests locally.

I think this one is ready.  Please review.

> Container launching code suppresses close exceptions after writes
> -----------------------------------------------------------------
>
>                 Key: YARN-7595
>                 URL: https://issues.apache.org/jira/browse/YARN-7595
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>            Reporter: Jason Lowe
>            Assignee: Jim Brennan
>         Attachments: YARN-7595.001.patch
>
>
> There are a number of places in code related to container launching where the 
> following pattern is used:
> {code}
>   try {
>     ...write to stream outStream...
>   } finally {
>     IOUtils.cleanupWithLogger(LOG, outStream);
>   }
> {code}
> Unfortunately this suppresses any IOException that occurs during the close() 
> method on outStream.  If the stream is buffered or could otherwise fail to 
> finish writing the file when trying to close then this can lead to 
> partial/corrupted data without throwing an I/O error.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to