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 572ACE4CD for ; Tue, 20 Nov 2012 22:08:59 +0000 (UTC) Received: (qmail 98593 invoked by uid 500); 20 Nov 2012 22:08:59 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 98548 invoked by uid 500); 20 Nov 2012 22:08: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 98539 invoked by uid 99); 20 Nov 2012 22:08:59 -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 22:08:59 +0000 Date: Tue, 20 Nov 2012 22:08:59 +0000 (UTC) From: "Tsz Wo (Nicholas), SZE (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <240197287.9676.1353449339093.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=13501537#comment-13501537 ] Tsz Wo (Nicholas), SZE commented on HDFS-4209: ---------------------------------------------- Let's split the patch since it involves quite a few different issues. > 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 > 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