hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject [2/2] hadoop git commit: HDFS-10619. Cache path in InodesInPath. Contributed by Daryn Sharp.
Date Wed, 31 May 2017 18:45:21 GMT
HDFS-10619. Cache path in InodesInPath. Contributed by Daryn Sharp.

(cherry picked from commit 90020624b05230ad4a7fbd666d0177ecb107a4d6)
(cherry picked from commit 3a89a8814f8e443a5f7ceddcecd6d953cfc2c6f3)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/81712e84
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/81712e84
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/81712e84

Branch: refs/heads/branch-2.7
Commit: 81712e84fba77e361b110f14f5388163a59cda25
Parents: fd83491
Author: Kihwal Lee <kihwal@apache.org>
Authored: Mon Oct 3 09:26:41 2016 -0500
Committer: Zhe Zhang <zhz@apache.org>
Committed: Wed May 31 08:50:26 2017 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                     | 2 ++
 .../org/apache/hadoop/hdfs/server/namenode/INodesInPath.java    | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/81712e84/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 09ee6cd..c5940cb 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -97,6 +97,8 @@ Release 2.7.4 - UNRELEASED
     HDFS-9726. Refactor IBR code to a new class. (Tsz-Wo Nicholas Sze
     Backport HDFS-11839 by Vinitha Reddy Gankidi)
 
+    HDFS-10619. Cache path in InodesInPath. (daryn via kihwal, backported by zhz)
+
   OPTIMIZATIONS
 
     HDFS-10896. Move lock logging logic from FSNamesystem into FSNamesystemLock.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/81712e84/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 3de8200..0badf6d 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
@@ -270,6 +270,8 @@ public class INodesInPath {
   }
 
   private final byte[][] path;
+  private final String pathname;
+
   /**
    * Array with the specified number of INodes resolved for a given path.
    */
@@ -291,6 +293,7 @@ public class INodesInPath {
     Preconditions.checkArgument(inodes != null && path != null);
     this.inodes = inodes;
     this.path = path;
+    this.pathname = DFSUtil.byteArray2PathString(path);
     this.isSnapshot = isSnapshot;
     this.snapshotId = snapshotId;
   }
@@ -346,7 +349,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


Mime
View raw message