Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B6D1F108F4 for ; Wed, 3 Jul 2013 13:05:27 +0000 (UTC) Received: (qmail 20776 invoked by uid 500); 3 Jul 2013 13:05:26 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 20142 invoked by uid 500); 3 Jul 2013 13:05:26 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 19850 invoked by uid 99); 3 Jul 2013 13:05:25 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jul 2013 13:05:25 +0000 Date: Wed, 3 Jul 2013 13:05:25 +0000 (UTC) From: "Hudson (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-9681) FileUtil.unTarUsingJava() should close the InputStream upon finishing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-9681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13698924#comment-13698924 ] Hudson commented on HADOOP-9681: -------------------------------- Integrated in Hadoop-Hdfs-trunk #1449 (See [https://builds.apache.org/job/Hadoop-Hdfs-trunk/1449/]) HADOOP-9681. FileUtil.unTarUsingJava() should close the InputStream upon finishing. Contributed by Chuan Liu. (Revision 1499069) Result = FAILURE cnauroth : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1499069 Files : * /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt * /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java > FileUtil.unTarUsingJava() should close the InputStream upon finishing > --------------------------------------------------------------------- > > Key: HADOOP-9681 > URL: https://issues.apache.org/jira/browse/HADOOP-9681 > Project: Hadoop Common > Issue Type: Bug > Affects Versions: 3.0.0, 1-win, 2.1.0-beta > Reporter: Chuan Liu > Assignee: Chuan Liu > Priority: Minor > Fix For: 3.0.0, 1-win, 2.1.0-beta > > Attachments: HADOOP-9681-branch-1-win.patch, HADOOP-9681-trunk.2.patch, HADOOP-9681-trunk.patch > > > In {{FileUtil.unTarUsingJava()}} method, we did not close input steams explicitly upon finish. This could lead to a file handle leak on Windows. > I discovered this when investigating the unit test case failure of {{TestFSDownload.testDownloadArchive()}}. FSDownload class will use {{FileUtil.unTarUsingJava()}} to unpack some temporary archive file. Later, the temporary file should be deleted. Because of the file handle leak, the {{File.delete()}} method fails. The test case then fails because it assert the temporary file should not exist. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira