[4/4] git commit: Merge branch 'trunk' into HDFS-6581

2014-09-27 Thread arp
Merge branch 'trunk' into HDFS-6581


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

Branch: refs/heads/HDFS-6581
Commit: 9cbb2c55d586e104fd988814ef4244c13468546e
Parents: d963966 7f300bc
Author: arp a...@apache.org
Authored: Sat Sep 27 20:28:03 2014 -0700
Committer: arp a...@apache.org
Committed: Sat Sep 27 20:28:03 2014 -0700

--
 hadoop-common-project/hadoop-common/CHANGES.txt |   3 +
 .../java/org/apache/hadoop/net/NetUtils.java|   2 +-
 .../src/site/apt/DeprecatedProperties.apt.vm|   2 +
 hadoop-mapreduce-project/CHANGES.txt|   4 +
 .../apache/hadoop/mapreduce/MRJobConfig.java|   2 +-
 .../hadoop/mapreduce/util/ConfigUtil.java   |   2 +
 hadoop-yarn-project/CHANGES.txt |   3 +
 .../hadoop-yarn/hadoop-yarn-client/pom.xml  |  35 
 .../api/impl/AMRMTokenIdentifierForTest.java| 130 +
 .../yarn/client/api/impl/TestAMRMClient.java|  39 +++-
 .../src/test/proto/test_amrm_token.proto|  31 +++
 .../hadoop-yarn/hadoop-yarn-common/pom.xml  |  24 +++
 .../yarn/security/AMRMTokenIdentifier.java  |  86 +---
 .../yarn/security/ContainerTokenIdentifier.java | 170 
 .../hadoop/yarn/security/NMTokenIdentifier.java |  97 ++---
 .../main/proto/server/yarn_security_token.proto |  53 +
 .../yarn/security/TestYARNTokenIdentifier.java  | 154 +++
 .../containermanager/ContainerManagerImpl.java  |  10 +-
 .../container/TestContainer.java|   4 +-
 .../TestApplicationMasterService.java   |   2 +-
 .../hadoop-yarn-server-tests/pom.xml|  29 +++
 .../server/ContainerTokenIdentifierForTest.java | 195 +++
 .../server/NMTokenIdentifierNewForTest.java | 145 ++
 .../server/TestContainerManagerSecurity.java| 116 +--
 .../src/test/proto/test_token.proto |  48 +
 25 files changed, 1218 insertions(+), 168 deletions(-)
--




[4/4] git commit: Merge branch 'trunk' into HDFS-6581

2014-09-19 Thread arp
Merge branch 'trunk' into HDFS-6581


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

Branch: refs/heads/HDFS-6581
Commit: 222bf0fe6706ee43964fd39b8315c1a339fbc84a
Parents: e4d29fd 25fd69a
Author: arp a...@apache.org
Authored: Fri Sep 19 10:02:27 2014 -0700
Committer: arp a...@apache.org
Committed: Fri Sep 19 10:02:27 2014 -0700

--
 .../hdfs/nfs/nfs3/TestRpcProgramNfs3.java   |  3 ++-
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt |  8 +++
 .../datanode/fsdataset/impl/FsDatasetImpl.java  | 16 +
 .../fsdataset/impl/TestWriteToReplica.java  | 25 +++-
 4 files changed, 46 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/222bf0fe/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
--

http://git-wip-us.apache.org/repos/asf/hadoop/blob/222bf0fe/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestWriteToReplica.java
--



[4/4] git commit: Merge branch 'trunk' into HDFS-6581

2014-09-17 Thread arp
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/HDFS-6581
Commit: a186d514bd0c5c5446faa6dd4896a8136d627837
Parents: 24f8156 f230248
Author: arp a...@apache.org
Authored: Wed Sep 17 15:03:55 2014 -0700
Committer: arp a...@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,