[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Lowe updated HDFS-12881: -- Resolution: Fixed Fix Version/s: 2.7.6 2.8.4 2.9.1 2.10.0 Status: Resolved (was: Patch Available) Thanks, Ajay! I committed this to branch-2, branch-2.9, branch-2.8, and branch-2.7 as well. > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Fix For: 3.1.0, 2.10.0, 2.9.1, 3.0.1, 2.8.4, 2.7.6 > > Attachments: HDFS-12881-branch-2.10.0.001.patch, > HDFS-12881.001.patch, HDFS-12881.002.patch, HDFS-12881.003.patch, > HDFS-12881.004.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Lowe updated HDFS-12881: -- Status: Patch Available (was: Reopened) > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Fix For: 3.1.0, 3.0.1 > > Attachments: HDFS-12881-branch-2.10.0.001.patch, > HDFS-12881.001.patch, HDFS-12881.002.patch, HDFS-12881.003.patch, > HDFS-12881.004.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Attachment: HDFS-12881-branch-2.10.0.001.patch > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Fix For: 3.1.0, 3.0.1 > > Attachments: HDFS-12881-branch-2.10.0.001.patch, > HDFS-12881.001.patch, HDFS-12881.002.patch, HDFS-12881.003.patch, > HDFS-12881.004.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Attachment: (was: HDFS-12924-branch-2.10.0.001.patch) > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Fix For: 3.1.0, 3.0.1 > > Attachments: HDFS-12881-branch-2.10.0.001.patch, > HDFS-12881.001.patch, HDFS-12881.002.patch, HDFS-12881.003.patch, > HDFS-12881.004.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Attachment: HDFS-12924-branch-2.10.0.001.patch > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Fix For: 3.1.0, 3.0.1 > > Attachments: HDFS-12881.001.patch, HDFS-12881.002.patch, > HDFS-12881.003.patch, HDFS-12881.004.patch, HDFS-12924-branch-2.10.0.001.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chen Liang updated HDFS-12881: -- Fix Version/s: 3.0.1 > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Fix For: 3.1.0, 3.0.1 > > Attachments: HDFS-12881.001.patch, HDFS-12881.002.patch, > HDFS-12881.003.patch, HDFS-12881.004.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chen Liang updated HDFS-12881: -- Fix Version/s: (was: 3.0.1) > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Fix For: 3.1.0 > > Attachments: HDFS-12881.001.patch, HDFS-12881.002.patch, > HDFS-12881.003.patch, HDFS-12881.004.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Lowe updated HDFS-12881: -- Resolution: Fixed Hadoop Flags: Reviewed Fix Version/s: 3.0.1 3.1.0 Status: Resolved (was: Patch Available) Thanks, Ajay! I committed this to trunk and branch-3.0. The problems exist in 2.x versions as well. Would you be willing to provide a patch for branch-2? > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Fix For: 3.1.0, 3.0.1 > > Attachments: HDFS-12881.001.patch, HDFS-12881.002.patch, > HDFS-12881.003.patch, HDFS-12881.004.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Attachment: HDFS-12881.004.patch > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Attachments: HDFS-12881.001.patch, HDFS-12881.002.patch, > HDFS-12881.003.patch, HDFS-12881.004.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Status: Patch Available (was: Open) > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Attachments: HDFS-12881.001.patch, HDFS-12881.002.patch, > HDFS-12881.003.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Status: Open (was: Patch Available) > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Attachments: HDFS-12881.001.patch, HDFS-12881.002.patch, > HDFS-12881.003.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Attachment: HDFS-12881.003.patch Updating patch to address checkstyle issue. Test failures in hadoop-yarn and hadoop-mapreduce are failing without patch as well. > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Attachments: HDFS-12881.001.patch, HDFS-12881.002.patch, > HDFS-12881.003.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Attachment: HDFS-12881.002.patch > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Attachments: HDFS-12881.001.patch, HDFS-12881.002.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Attachment: (was: HDFS-12881.002patch) > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Attachments: HDFS-12881.001.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Attachment: HDFS-12881.002patch > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Attachments: HDFS-12881.001.patch, HDFS-12881.002patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Status: Patch Available (was: Open) > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Attachments: HDFS-12881.001.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Attachment: (was: HDFS-12881.001.patch) > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Attachments: HDFS-12881.001.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Attachment: HDFS-12881.001.patch > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Attachments: HDFS-12881.001.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org
[jira] [Updated] (HDFS-12881) Output streams closed with IOUtils suppressing write errors
[ https://issues.apache.org/jira/browse/HDFS-12881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajay Kumar updated HDFS-12881: -- Attachment: HDFS-12881.001.patch > Output streams closed with IOUtils suppressing write errors > --- > > Key: HDFS-12881 > URL: https://issues.apache.org/jira/browse/HDFS-12881 > Project: Hadoop HDFS > Issue Type: Bug >Reporter: Jason Lowe >Assignee: Ajay Kumar > Attachments: HDFS-12881.001.patch > > > There are a few places in HDFS code 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org