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 D1713E323 for ; Tue, 20 Nov 2012 14:48:59 +0000 (UTC) Received: (qmail 15499 invoked by uid 500); 20 Nov 2012 14:48:59 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 15435 invoked by uid 500); 20 Nov 2012 14:48:59 -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 15385 invoked by uid 99); 20 Nov 2012 14:48:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Nov 2012 14:48:58 +0000 Date: Tue, 20 Nov 2012 14:48:58 +0000 (UTC) From: "Suresh Srinivas (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <1209341011.6906.1353422938473.JavaMail.jiratomcat@arcas> In-Reply-To: <1825678687.1233.1353287218414.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HDFS-4209) Clean up FSDirectory and INode 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-4209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501215#comment-13501215 ] Suresh Srinivas commented on HDFS-4209: --------------------------------------- Comments: # FSDirectory.java - Reading the namenode cache threshold is moved? There is also call to reset(). The need for this is not obvious to me. # addToParentForImageLoading - I would use the same convention as currently exists unprotectedAddToParent(). While this may not be a great method name, at least it does not make the method name relevant only for image loading. In the future the method may be used for something other than image loading. Please update the javadoc to say, one example where this method is called is during image loading... # addToParentForImageLoading silently ignores failure to addChild to the parent. This is not a code introduced by this patch. We should address this in a separate jira. # FSDirectory.java changes could have been divided into smaller jiras. #* New methods for processing the last inode of inodesInPath could have been seaprate from this jira. But given I have gone through the review you could leave it in this jira. Up to you. #* If possible move the fixes where settimg parent's mtime correctly etc. into another jira. # Instead of throwing generic IOException, we should throw specific exception in Inode*.valueOf() methods. This could be done in another jira. > Clean up FSDirectory and INode > ------------------------------ > > Key: HDFS-4209 > URL: https://issues.apache.org/jira/browse/HDFS-4209 > Project: Hadoop HDFS > Issue Type: Bug > Components: name-node > Reporter: Tsz Wo (Nicholas), SZE > Assignee: Tsz Wo (Nicholas), SZE > Priority: Minor > Attachments: h4209_20121118b.patch, h4209_20121118.patch, h4209_20121119.patch > > > - FSDirectory.addToParent(..) is only used by image loading so that synchronization, modification time update and space count update are not needed. > - There are multiple places checking whether an inode is file by checking !isDirectory() && !isSymlink(). Let's add isFile() to INode. > - In the addNode/addChild/addChildNoQuotaCheck methods, returning the same INode back is not useful. It is better to simply return a boolean to indicate whether the inode is added. Also, the value of childDiskspace parameter is always UNKNOWN_DISK_SPACE. -- 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