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 36BC117E08 for ; Mon, 29 Sep 2014 19:11:39 +0000 (UTC) Received: (qmail 69295 invoked by uid 500); 29 Sep 2014 19:11:39 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 69237 invoked by uid 500); 29 Sep 2014 19:11:38 -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 69222 invoked by uid 99); 29 Sep 2014 19:11:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2014 19:11:38 +0000 Date: Mon, 29 Sep 2014 19:11:38 +0000 (UTC) From: "Zhe Zhang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-7104) Fix and clarify INodeInPath getter functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-7104?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D14152= 095#comment-14152095 ]=20 Zhe Zhang commented on HDFS-7104: --------------------------------- [~jingzhao] Thank you for reviewing!=20 I did a quick check and the latest patch (HDFS-7104-20140924-v3.patch) stil= l applies and passes related tests with the current trunk. > Fix and clarify INodeInPath getter functions > -------------------------------------------- > > Key: HDFS-7104 > URL: https://issues.apache.org/jira/browse/HDFS-7104 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Zhe Zhang > Assignee: Zhe Zhang > Priority: Minor > Attachments: HDFS-7104-20140923-v1.patch, HDFS-7104-20140923-v3.p= atch, HDFS-7104-20140924-v1.patch, HDFS-7104-20140924-v2.patch, HDFS-7104-2= 0140924-v3.patch > > > inodes is initialized with the number of patch components. After resolve,= it contains both non-null and null elements (introduced by dot-snapshot di= rs). > When getINodes is called, an array is returned excluding all non elements= , which is the correct behavior. Meanwhile, the inodes array is trimmed too= , which shouldn't be done by a getter. > Because of the above, the behavior of getINodesInPath depends on whether = getINodes has been called, which is not correct. > The name of getLastINodeInPath is confusing =E2=80=93 it actually returns= the last non-null inode in the path. Also, shouldn't the return type be a = single INode? -- This message was sent by Atlassian JIRA (v6.3.4#6332)