Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AD5A8200BA6 for ; Tue, 4 Oct 2016 00:58:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ABF2A160AEC; Mon, 3 Oct 2016 22:58:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EB5B4160ADC for ; Tue, 4 Oct 2016 00:58:35 +0200 (CEST) Received: (qmail 6564 invoked by uid 500); 3 Oct 2016 22:58:17 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 3352 invoked by uid 99); 3 Oct 2016 22:58:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Oct 2016 22:58:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CED33E0200; Mon, 3 Oct 2016 22:58:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: inigoiri@apache.org To: common-commits@hadoop.apache.org Date: Mon, 03 Oct 2016 22:59:06 -0000 Message-Id: <352dc0ca727549118775f46802997296@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [53/57] [abbrv] hadoop git commit: HDFS-10619. Cache path in InodesInPath. Contributed by Daryn Sharp. archived-at: Mon, 03 Oct 2016 22:58:36 -0000 HDFS-10619. Cache path in InodesInPath. Contributed by Daryn Sharp. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/90020624 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/90020624 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/90020624 Branch: refs/heads/HDFS-10467 Commit: 90020624b05230ad4a7fbd666d0177ecb107a4d6 Parents: 0da54e8 Author: Kihwal Lee Authored: Mon Oct 3 09:13:04 2016 -0500 Committer: Kihwal Lee Committed: Mon Oct 3 09:13:04 2016 -0500 ---------------------------------------------------------------------- .../org/apache/hadoop/hdfs/server/namenode/INodesInPath.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/90020624/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodesInPath.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodesInPath.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodesInPath.java index 04d3bda..f05fa37 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodesInPath.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodesInPath.java @@ -278,6 +278,8 @@ public class INodesInPath { } private final byte[][] path; + private final String pathname; + /** * Array with the specified number of INodes resolved for a given path. */ @@ -306,6 +308,7 @@ public class INodesInPath { Preconditions.checkArgument(inodes != null && path != null); this.inodes = inodes; this.path = path; + this.pathname = DFSUtil.byteArray2PathString(path); this.isRaw = isRaw; this.isSnapshot = isSnapshot; this.snapshotId = snapshotId; @@ -366,7 +369,7 @@ public class INodesInPath { /** @return the full path in string form */ public String getPath() { - return DFSUtil.byteArray2PathString(path); + return pathname; } public String getParentPath() { --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-commits-help@hadoop.apache.org