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 B2B647416 for ; Wed, 14 Sep 2011 04:54:38 +0000 (UTC) Received: (qmail 6129 invoked by uid 500); 14 Sep 2011 04:54:37 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 6091 invoked by uid 500); 14 Sep 2011 04:54:37 -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 6060 invoked by uid 99); 14 Sep 2011 04:54:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Sep 2011 04:54:36 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,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; Wed, 14 Sep 2011 04:54:29 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DBA2396596 for ; Wed, 14 Sep 2011 04:54:08 +0000 (UTC) Date: Wed, 14 Sep 2011 04:54:08 +0000 (UTC) From: "Uma Maheswara Rao G (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <786294599.25319.1315976048896.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <125103313.24962.1315965009151.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (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:comment-tabpanel&focusedCommentId=13104250#comment-13104250 ] Uma Maheswara Rao G commented on HDFS-2330: ------------------------------------------- Test failures are not related. Since the changes are related to stream closures, not provided any special tests for this change. > 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 > Attachments: 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. For more information on JIRA, see: http://www.atlassian.com/software/jira