Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 3353364C1 for ; Mon, 30 May 2011 11:49:29 +0000 (UTC) Received: (qmail 78779 invoked by uid 500); 30 May 2011 11:49:29 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 78698 invoked by uid 500); 30 May 2011 11:49:29 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 78690 invoked by uid 99); 30 May 2011 11:49:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 May 2011 11:49:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 May 2011 11:49:28 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 00583E9CD3 for ; Mon, 30 May 2011 11:48:48 +0000 (UTC) Date: Mon, 30 May 2011 11:48:47 +0000 (UTC) From: "ramkrishna.s.vasudevan (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <2056125942.53249.1306756127998.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <785902502.38968.1306239047527.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HDFS-1990) Resource leaks in HDFS 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/HDFS-1990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13041098#comment-13041098 ] ramkrishna.s.vasudevan commented on HDFS-1990: ---------------------------------------------- In BlockReceiver.java In close() api {noformat} try { checksumOut.flush(); if (datanode.syncOnClose && (cout instanceof FileOutputStream)) { ((FileOutputStream) cout).getChannel().force(true); } checksumOut.close(); } catch (IOException e) { ioe = e; } {noformat} we are trying to close the streams in try block. If some exception occurs we will not be closing the streams which may lead to resource leak. Similar thing can happen in {noformat} try{ if (out != null) { out.flush(); if (datanode.syncOnClose && (out instanceof FileOutputStream)) { ((FileOutputStream) out).getChannel().force(true); } out.close(); } catch (IOException e) { ioe = e; } {noformat} > Resource leaks in HDFS > ---------------------- > > Key: HDFS-1990 > URL: https://issues.apache.org/jira/browse/HDFS-1990 > Project: Hadoop HDFS > Issue Type: Bug > Components: data-node, name-node > Affects Versions: 0.23.0 > Reporter: ramkrishna.s.vasudevan > Priority: Minor > Fix For: 0.23.0 > > > Possible resource leakage in HDFS. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira