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 9AF58D15D for ; Mon, 19 Nov 2012 02:04:58 +0000 (UTC) Received: (qmail 60482 invoked by uid 500); 19 Nov 2012 02:04:58 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 60441 invoked by uid 500); 19 Nov 2012 02:04:58 -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 60429 invoked by uid 99); 19 Nov 2012 02:04:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2012 02:04:58 +0000 Date: Mon, 19 Nov 2012 02:04:58 +0000 (UTC) From: "Tsz Wo (Nicholas), SZE (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <444771867.1396.1353290698326.JavaMail.jiratomcat@arcas> In-Reply-To: <1825678687.1233.1353287218414.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (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:all-tabpanel ] Tsz Wo (Nicholas), SZE updated HDFS-4209: ----------------------------------------- Description: - 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. was: - 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. - 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 childDiskspace parameter is always unknown. > 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_20121118.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