[ https://issues.apache.org/jira/browse/HADOOP-15085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16291147#comment-16291147 ]
Hudson commented on HADOOP-15085: --------------------------------- SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #13376 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/13376/]) HADOOP-15085. Output streams closed with IOUtils suppressing write (jlowe: rev f8af0e2feb9f45aeaa9711dbf93115ffb1a07e5d) * (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java * (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIO.java * (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CopyCommands.java * (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/MapFile.java * (edit) hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/MiniKMS.java * (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java * (edit) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java * (edit) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/compress/TestCodec.java > Output streams closed with IOUtils suppressing write errors > ----------------------------------------------------------- > > Key: HADOOP-15085 > URL: https://issues.apache.org/jira/browse/HADOOP-15085 > Project: Hadoop Common > Issue Type: Bug > Reporter: Jason Lowe > Assignee: Jim Brennan > Fix For: 3.1.0, 3.0.1 > > Attachments: HADOOP-15085.001.patch, HADOOP-15085.002.patch, > HADOOP-15085.003.patch, HADOOP-15085.004.patch, HADOOP-15085.005.patch > > > There are a few places in hadoop-common that are closing an output stream > with IOUtils.cleanupWithLogger like this: > {code} > try { > ...write to outStream... > } finally { > IOUtils.cleanupWithLogger(LOG, outStream); > } > {code} > This suppresses any IOException that occurs during the close() method which > could lead to partial/corrupted output without throwing a corresponding > exception. The code should either use try-with-resources or explicitly close > the stream within the try block so the exception thrown during close() is > properly propagated as exceptions during write operations are. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org