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 30D199DA2 for ; Thu, 11 Oct 2012 17:48:28 +0000 (UTC) Received: (qmail 86027 invoked by uid 500); 11 Oct 2012 17:48:27 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 85999 invoked by uid 500); 11 Oct 2012 17:48:27 -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 85990 invoked by uid 99); 11 Oct 2012 17:48:27 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Oct 2012 17:48:27 +0000 Date: Thu, 11 Oct 2012 17:48:27 +0000 (UTC) From: "Arun C Murthy (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <1073880324.30004.1349977707905.JavaMail.jiratomcat@arcas> In-Reply-To: <125103313.24962.1315965009151.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (HDFS-2330) In NNStorage.java, IOExceptions of stream closures can mask root exceptions. 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-2330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arun C Murthy closed HDFS-2330. ------------------------------- > In NNStorage.java, IOExceptions of stream closures can mask root exceptions. > ----------------------------------------------------------------------------- > > Key: HDFS-2330 > URL: https://issues.apache.org/jira/browse/HDFS-2330 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: name-node > Affects Versions: 0.24.0 > Reporter: Uma Maheswara Rao G > Assignee: Uma Maheswara Rao G > Fix For: 3.0.0, 2.0.2-alpha > > Attachments: HDFS-2330.patch, HDFS-2330.patch > > > In NNStorage.java: > There are many stream closures in finally block. > There is a chance that they can mask the root exceptions. > So, better to follow the pattern like below: > {code} > try{ > ............ > ............ > stream.close(); > stream =null; > } > finally{ > IOUtils.cleanup(LOG, stream); > } > {code} -- 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