[
https://issues.apache.org/jira/browse/HADOOP-11392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Nauroth updated HADOOP-11392:
-----------------------------------
Resolution: Won't Fix
Status: Resolved (was: Patch Available)
[~brahmareddy], yes, please go ahead and file a new jira to track the
deprecation. In the new jira, would you please add a comment linking to my
earlier comment here?
https://issues.apache.org/jira/browse/HADOOP-11392?focusedCommentId=14339336&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14339336
This will help us remember to track down the call site in Mahout and ask them
to migrate off of it. Thanks!
> 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}
> *can we use IOUtils.closeStream while closing the streams*
> {code}
> IOUtils.copyBytes(in, out, conf, false);
> if (addString!=null)
> out.write(addString.getBytes("UTF-8"));
>
> } finally {
> in.close();
> }
> }
> }
> } finally {
> out.close();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)