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 E6D2DDAA6 for ; Wed, 24 Oct 2012 16:42:13 +0000 (UTC) Received: (qmail 98703 invoked by uid 500); 24 Oct 2012 16:42:13 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 98578 invoked by uid 500); 24 Oct 2012 16:42:13 -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 98460 invoked by uid 99); 24 Oct 2012 16:42:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2012 16:42:12 +0000 Date: Wed, 24 Oct 2012 16:42:12 +0000 (UTC) From: "Suresh Srinivas (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <2078678270.22534.1351096932466.JavaMail.jiratomcat@arcas> In-Reply-To: <432072794.14476.1350963312901.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HDFS-4107) Add utility methods to cast INode to INodeFile and INodeFileUnderConstruction 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-4107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13483371#comment-13483371 ] Suresh Srinivas commented on HDFS-4107: --------------------------------------- Went through the call stack to ensure the behavior is not changed. Only change I see is throwing ClassCastException instead of NPE in one of the cases. Can you please add few unit tests for these new methods? > Add utility methods to cast INode to INodeFile and INodeFileUnderConstruction > ----------------------------------------------------------------------------- > > Key: HDFS-4107 > URL: https://issues.apache.org/jira/browse/HDFS-4107 > Project: Hadoop HDFS > Issue Type: Bug > Components: name-node > Reporter: Tsz Wo (Nicholas), SZE > Assignee: Tsz Wo (Nicholas), SZE > Attachments: h4107_20121022.patch, h4107_20121023.patch > > > In the namenode code, there are many individual routines checking whether an inode is null and whether it could be cast to INodeFile/INodeFileUnderConstruction. Let's add utility methods for such checks. -- 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