Repository: hadoop
Updated Branches:
  refs/heads/branch-2 3f71a1581 -> 09c324a4a


HDFS-7148. TestEncryptionZones#testIsEncryptedMethod fails on branch-2 after 
archival storage merge. (wang)


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

Branch: refs/heads/branch-2
Commit: 09c324a4a86be434a2901b48fe82e293306f551c
Parents: 3f71a15
Author: Andrew Wang <[email protected]>
Authored: Thu Sep 25 21:50:12 2014 -0700
Committer: Andrew Wang <[email protected]>
Committed: Thu Sep 25 21:50:12 2014 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt            |  3 +++
 .../hadoop/hdfs/server/namenode/FSDirectory.java       | 13 +++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/09c324a4/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 35efea7..efe11d0 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -480,6 +480,9 @@ Release 2.6.0 - UNRELEASED
     HDFS-7049. TestByteRangeInputStream.testPropagatedClose fails and throw
     NPE on branch-2. (Juan Yu via wheat9)
 
+    HDFS-7148. TestEncryptionZones#testIsEncryptedMethod fails on branch-2
+    after archival storage merge. (wang)
+
     BREAKDOWN OF HDFS-6134 AND HADOOP-10150 SUBTASKS AND RELATED JIRAS
   
       HDFS-6387. HDFS CLI admin tool for creating & deleting an

http://git-wip-us.apache.org/repos/asf/hadoop/blob/09c324a4/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
index cb97ba4..e07010c 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
@@ -1404,9 +1404,10 @@ public class FSDirectory implements Closeable {
       if (srcs.endsWith(HdfsConstants.SEPARATOR_DOT_SNAPSHOT_DIR)) {
         return getSnapshotsListing(srcs, startAfter);
       }
-      final INodesInPath inodesInPath = getLastINodeInPath(srcs);
+      final INodesInPath inodesInPath = getINodesInPath(srcs, true);
+      final INode[] inodes = inodesInPath.getINodes();
       final int snapshot = inodesInPath.getPathSnapshotId();
-      final INode targetNode = inodesInPath.getLastINode();
+      final INode targetNode = inodes[inodes.length - 1];
       if (targetNode == null)
         return null;
       byte parentStoragePolicy = isSuperUser ?
@@ -1515,7 +1516,8 @@ public class FSDirectory implements Closeable {
       byte policyId = includeStoragePolicy && i != null && !i.isSymlink() ?
           i.getStoragePolicyID() : BlockStoragePolicySuite.ID_UNSPECIFIED;
       return i == null ? null : createFileStatus(HdfsFileStatus.EMPTY_NAME, i,
-          policyId, inodesInPath.getPathSnapshotId(), isRawPath, inodesInPath);
+          policyId, inodesInPath.getPathSnapshotId(), isRawPath,
+          inodesInPath);
     } finally {
       readUnlock();
     }
@@ -2186,7 +2188,6 @@ public class FSDirectory implements Closeable {
       }
     }
   }
-
   
   /**
    * This method is always called with writeLock of FSDirectory held.
@@ -2835,7 +2836,7 @@ public class FSDirectory implements Closeable {
    * @return consolidated file encryption info; null for non-encrypted files
    */
   FileEncryptionInfo getFileEncryptionInfo(INode inode, int snapshotId,
-                                           INodesInPath iip) throws 
IOException {
+      INodesInPath iip) throws IOException {
     if (!inode.isFile()) {
       return null;
     }
@@ -3037,7 +3038,7 @@ public class FSDirectory implements Closeable {
   }
 
   private XAttr unprotectedGetXAttrByName(INode inode, int snapshotId,
-                                          String xAttrName)
+      String xAttrName)
       throws IOException {
     List<XAttr> xAttrs = XAttrStorage.readINodeXAttrs(inode, snapshotId);
     if (xAttrs == null) {

Reply via email to