hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brahma Reddy Battula (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-11392) Use IOUtils.closeStream while closing streams in FileUtil.java
Date Sat, 21 Feb 2015 03:11:11 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-11392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Brahma Reddy Battula updated HADOOP-11392:
------------------------------------------
    Summary: Use IOUtils.closeStream while closing streams in FileUtil.java  (was: Use FileUtil.java
leaks file descriptor when copybytes success.)

> Use IOUtils.closeStream while closing streams in FileUtil.java
> --------------------------------------------------------------
>
>                 Key: HADOOP-11392
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11392
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Brahma Reddy Battula
>            Assignee: Brahma Reddy Battula
>         Attachments: HADOOP-11392-1.patch, HADOOP-11392.patch
>
>
>  Please check following code for same..
> {code}
> try {
>         in = srcFS.open(src);
>         out = dstFS.create(dst, overwrite);
>         IOUtils.copyBytes(in, out, conf, true);
>       } catch (IOException e) {
>         IOUtils.closeStream(out);
>         IOUtils.closeStream(in);
>         throw e;
>       }
>     }
> {code}



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

Mime
View raw message