hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [06/50] [abbrv] git commit: Merge branch 'trunk' into HDFS-6581
Date Wed, 01 Oct 2014 16:05:57 GMT
Merge branch 'trunk' into HDFS-6581

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java


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

Branch: refs/heads/trunk
Commit: a186d514bd0c5c5446faa6dd4896a8136d627837
Parents: 24f8156 f230248
Author: arp <arp@apache.org>
Authored: Wed Sep 17 15:03:55 2014 -0700
Committer: arp <arp@apache.org>
Committed: Wed Sep 17 15:03:55 2014 -0700

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt |  5 ++
 .../hadoop/crypto/key/KeyProviderFactory.java   |  3 +-
 .../java/org/apache/hadoop/fs/FileStatus.java   |  9 ++
 .../hadoop/fs/permission/FsPermission.java      |  7 ++
 .../src/site/markdown/filesystem/filesystem.md  | 31 +++++++
 .../fs/contract/AbstractContractOpenTest.java   | 12 +++
 .../hadoop/hdfs/protocol/FsAclPermission.java   | 77 -----------------
 .../hdfs/protocol/FsPermissionExtension.java    | 89 ++++++++++++++++++++
 .../apache/hadoop/hdfs/protocolPB/PBHelper.java |  4 +-
 .../hdfs/server/namenode/FSDirectory.java       | 36 +++++---
 .../org/apache/hadoop/hdfs/web/JsonUtil.java    | 16 +++-
 .../apache/hadoop/hdfs/TestEncryptionZones.java | 88 +++++++++++++++++++
 .../hdfs/server/namenode/FSAclBaseTest.java     |  5 +-
 13 files changed, 287 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a186d514/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hadoop/blob/a186d514/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/PBHelper.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hadoop/blob/a186d514/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
----------------------------------------------------------------------
diff --cc hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
index bf6c25e,56105d9..8ea653a
--- 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
@@@ -2315,14 -2313,22 +2315,24 @@@ public class FSDirectory implements Clo
       long size = 0;     // length is zero for directories
       short replication = 0;
       long blocksize = 0;
 +     boolean isLazyPersist = false;
+      final boolean isEncrypted;
+ 
+      final FileEncryptionInfo feInfo = isRawPath ? null :
+          getFileEncryptionInfo(node, snapshot);
+ 
       if (node.isFile()) {
         final INodeFile fileNode = node.asFile();
         size = fileNode.computeFileSize(snapshot);
         replication = fileNode.getFileReplication(snapshot);
         blocksize = fileNode.getPreferredBlockSize();
 +       isLazyPersist = fileNode.getLazyPersistFlag();
+        isEncrypted = (feInfo != null) ||
+            (isRawPath && isInAnEZ(INodesInPath.fromINode(node)));
+      } else {
+        isEncrypted = isInAnEZ(INodesInPath.fromINode(node));
       }
+ 
       int childrenNum = node.isDirectory() ? 
           node.asDirectory().getChildrenNum(snapshot) : 0;
  
@@@ -2334,10 -2337,9 +2341,10 @@@
          node.isDirectory(), 
          replication, 
          blocksize,
 +        isLazyPersist,
          node.getModificationTime(snapshot),
          node.getAccessTime(snapshot),
-         getPermissionForFileStatus(node, snapshot),
+         getPermissionForFileStatus(node, snapshot, isEncrypted),
          node.getUserName(snapshot),
          node.getGroupName(snapshot),
          node.isSymlink() ? node.asSymlink().getSymlink() : null,
@@@ -2356,8 -2358,8 +2363,9 @@@
      long size = 0; // length is zero for directories
      short replication = 0;
      long blocksize = 0;
 +    boolean isLazyPersist = false;
      LocatedBlocks loc = null;
+     final boolean isEncrypted;
      final FileEncryptionInfo feInfo = isRawPath ? null :
          getFileEncryptionInfo(node, snapshot);
      if (node.isFile()) {
@@@ -2383,9 -2389,9 +2395,9 @@@
  
      HdfsLocatedFileStatus status =
          new HdfsLocatedFileStatus(size, node.isDirectory(), replication,
 -          blocksize, node.getModificationTime(snapshot),
 +          blocksize, isLazyPersist, node.getModificationTime(snapshot),
            node.getAccessTime(snapshot),
-           getPermissionForFileStatus(node, snapshot),
+           getPermissionForFileStatus(node, snapshot, isEncrypted),
            node.getUserName(snapshot), node.getGroupName(snapshot),
            node.isSymlink() ? node.asSymlink().getSymlink() : null, path,
            node.getId(), loc, childrenNum, feInfo);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/a186d514/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/JsonUtil.java
----------------------------------------------------------------------


Mime
View raw message