[41/50] [abbrv] hadoop git commit: HADOOP-14642. wasb: add support for caching Authorization and SASKeys. Contributed by Sivaguru Sankaridurg.

2017-07-19 Thread xyao
HADOOP-14642. wasb: add support for caching Authorization and SASKeys. 
Contributed by Sivaguru Sankaridurg.


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

Branch: refs/heads/HDFS-7240
Commit: 2843c688bcc21c65eb3538ffb3caeaffe440eda8
Parents: 845c4e5
Author: Jitendra Pandey 
Authored: Wed Jul 19 00:13:06 2017 -0700
Committer: Jitendra Pandey 
Committed: Wed Jul 19 00:13:06 2017 -0700

--
 .../src/main/resources/core-default.xml |   9 +-
 .../conf/TestCommonConfigurationFields.java |   1 +
 .../hadoop/fs/azure/CachingAuthorizer.java  | 232 +++
 .../fs/azure/LocalSASKeyGeneratorImpl.java  |  28 ++-
 .../hadoop/fs/azure/NativeAzureFileSystem.java  |   3 -
 .../fs/azure/RemoteSASKeyGeneratorImpl.java |  46 +++-
 .../fs/azure/RemoteWasbAuthorizerImpl.java  |  38 ++-
 .../hadoop/fs/azure/SASKeyGeneratorImpl.java|   4 +-
 .../hadoop-azure/src/site/markdown/index.md |  38 +++
 .../hadoop/fs/azure/AbstractWasbTestBase.java   |   5 +
 .../hadoop/fs/azure/MockWasbAuthorizerImpl.java |  22 +-
 .../TestNativeAzureFSAuthorizationCaching.java  |  60 +
 .../TestNativeAzureFileSystemAuthorization.java |  86 ++-
 ...veAzureFileSystemAuthorizationWithOwner.java |   2 +-
 .../fs/azure/TestWasbRemoteCallHelper.java  |   6 +-
 .../src/test/resources/azure-test.xml   |   3 +-
 16 files changed, 499 insertions(+), 84 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/2843c688/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
--
diff --git 
a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml 
b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
index a705a4e..68b0a9d 100644
--- a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
+++ b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
@@ -1343,7 +1343,14 @@
 configuration
   
 
-
+
+  fs.azure.authorization.caching.enable
+  true
+  
+Config flag to enable caching of authorization results and saskeys in WASB.
+This flag is relevant only when fs.azure.authorization is enabled.
+  
+
 
 
   io.seqfile.compress.blocksize

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2843c688/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
--
diff --git 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
index 8524973..593254eb 100644
--- 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
+++ 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
@@ -115,6 +115,7 @@ public class TestCommonConfigurationFields extends 
TestConfigurationFieldsBase {
 xmlPropsToSkipCompare.add("fs.azure.local.sas.key.mode");
 xmlPropsToSkipCompare.add("fs.azure.secure.mode");
 xmlPropsToSkipCompare.add("fs.azure.authorization");
+xmlPropsToSkipCompare.add("fs.azure.authorization.caching.enable");
 
 // Deprecated properties.  These should eventually be removed from the
 // class.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2843c688/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/CachingAuthorizer.java
--
diff --git 
a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/CachingAuthorizer.java
 
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/CachingAuthorizer.java
new file mode 100644
index 000..016ae74
--- /dev/null
+++ 
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/CachingAuthorizer.java
@@ -0,0 +1,232 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on

hadoop git commit: HADOOP-14642. wasb: add support for caching Authorization and SASKeys. Contributed by Sivaguru Sankaridurg.

2017-07-19 Thread jitendra
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 e0297ffbc -> 23b920cd7


HADOOP-14642. wasb: add support for caching Authorization and SASKeys. 
Contributed by Sivaguru Sankaridurg.


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

Branch: refs/heads/branch-2
Commit: 23b920cd7ab23ad71adc75439e8bb6ec5a7924bd
Parents: e0297ff
Author: Jitendra Pandey 
Authored: Wed Jul 19 00:38:45 2017 -0700
Committer: Jitendra Pandey 
Committed: Wed Jul 19 11:37:36 2017 -0700

--
 .../src/main/resources/core-default.xml |   9 +
 .../conf/TestCommonConfigurationFields.java |   1 +
 .../hadoop/fs/azure/CachingAuthorizer.java  | 232 +++
 .../fs/azure/LocalSASKeyGeneratorImpl.java  |  28 ++-
 .../hadoop/fs/azure/NativeAzureFileSystem.java  |   3 -
 .../fs/azure/RemoteSASKeyGeneratorImpl.java |  46 +++-
 .../fs/azure/RemoteWasbAuthorizerImpl.java  |  38 ++-
 .../hadoop/fs/azure/SASKeyGeneratorImpl.java|   4 +-
 .../hadoop-azure/src/site/markdown/index.md |  38 +++
 .../hadoop/fs/azure/AbstractWasbTestBase.java   |   5 +
 .../hadoop/fs/azure/MockWasbAuthorizerImpl.java |  22 +-
 .../TestNativeAzureFSAuthorizationCaching.java  |  60 +
 .../TestNativeAzureFileSystemAuthorization.java |  86 ++-
 ...veAzureFileSystemAuthorizationWithOwner.java |   2 +-
 .../fs/azure/TestWasbRemoteCallHelper.java  |   6 +-
 .../src/test/resources/azure-test.xml   |   3 +-
 16 files changed, 500 insertions(+), 83 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/23b920cd/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
--
diff --git 
a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml 
b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
index 0ea607f..4d6b19e 100644
--- a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
+++ b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
@@ -1347,6 +1347,15 @@
   
 
 
+
+  fs.azure.authorization.caching.enable
+  true
+  
+Config flag to enable caching of authorization results and saskeys in WASB.
+This flag is relevant only when fs.azure.authorization is enabled.
+  
+
+
   
 
   

http://git-wip-us.apache.org/repos/asf/hadoop/blob/23b920cd/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
--
diff --git 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
index 30e08d5..65e452e 100644
--- 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
+++ 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
@@ -111,6 +111,7 @@ public class TestCommonConfigurationFields extends 
TestConfigurationFieldsBase {
 xmlPropsToSkipCompare.add("fs.azure.local.sas.key.mode");
 xmlPropsToSkipCompare.add("fs.azure.secure.mode");
 xmlPropsToSkipCompare.add("fs.azure.authorization");
+xmlPropsToSkipCompare.add("fs.azure.authorization.caching.enable");
 
 // ADL properties are in a different subtree
 // - org.apache.hadoop.hdfs.web.ADLConfKeys

http://git-wip-us.apache.org/repos/asf/hadoop/blob/23b920cd/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/CachingAuthorizer.java
--
diff --git 
a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/CachingAuthorizer.java
 
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/CachingAuthorizer.java
new file mode 100644
index 000..016ae74
--- /dev/null
+++ 
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/CachingAuthorizer.java
@@ -0,0 +1,232 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * di

hadoop git commit: HADOOP-14642. wasb: add support for caching Authorization and SASKeys. Contributed by Sivaguru Sankaridurg.

2017-07-19 Thread jitendra
Repository: hadoop
Updated Branches:
  refs/heads/trunk 845c4e52b -> 2843c688b


HADOOP-14642. wasb: add support for caching Authorization and SASKeys. 
Contributed by Sivaguru Sankaridurg.


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

Branch: refs/heads/trunk
Commit: 2843c688bcc21c65eb3538ffb3caeaffe440eda8
Parents: 845c4e5
Author: Jitendra Pandey 
Authored: Wed Jul 19 00:13:06 2017 -0700
Committer: Jitendra Pandey 
Committed: Wed Jul 19 00:13:06 2017 -0700

--
 .../src/main/resources/core-default.xml |   9 +-
 .../conf/TestCommonConfigurationFields.java |   1 +
 .../hadoop/fs/azure/CachingAuthorizer.java  | 232 +++
 .../fs/azure/LocalSASKeyGeneratorImpl.java  |  28 ++-
 .../hadoop/fs/azure/NativeAzureFileSystem.java  |   3 -
 .../fs/azure/RemoteSASKeyGeneratorImpl.java |  46 +++-
 .../fs/azure/RemoteWasbAuthorizerImpl.java  |  38 ++-
 .../hadoop/fs/azure/SASKeyGeneratorImpl.java|   4 +-
 .../hadoop-azure/src/site/markdown/index.md |  38 +++
 .../hadoop/fs/azure/AbstractWasbTestBase.java   |   5 +
 .../hadoop/fs/azure/MockWasbAuthorizerImpl.java |  22 +-
 .../TestNativeAzureFSAuthorizationCaching.java  |  60 +
 .../TestNativeAzureFileSystemAuthorization.java |  86 ++-
 ...veAzureFileSystemAuthorizationWithOwner.java |   2 +-
 .../fs/azure/TestWasbRemoteCallHelper.java  |   6 +-
 .../src/test/resources/azure-test.xml   |   3 +-
 16 files changed, 499 insertions(+), 84 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/2843c688/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
--
diff --git 
a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml 
b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
index a705a4e..68b0a9d 100644
--- a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
+++ b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
@@ -1343,7 +1343,14 @@
 configuration
   
 
-
+
+  fs.azure.authorization.caching.enable
+  true
+  
+Config flag to enable caching of authorization results and saskeys in WASB.
+This flag is relevant only when fs.azure.authorization is enabled.
+  
+
 
 
   io.seqfile.compress.blocksize

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2843c688/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
--
diff --git 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
index 8524973..593254eb 100644
--- 
a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
+++ 
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestCommonConfigurationFields.java
@@ -115,6 +115,7 @@ public class TestCommonConfigurationFields extends 
TestConfigurationFieldsBase {
 xmlPropsToSkipCompare.add("fs.azure.local.sas.key.mode");
 xmlPropsToSkipCompare.add("fs.azure.secure.mode");
 xmlPropsToSkipCompare.add("fs.azure.authorization");
+xmlPropsToSkipCompare.add("fs.azure.authorization.caching.enable");
 
 // Deprecated properties.  These should eventually be removed from the
 // class.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2843c688/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/CachingAuthorizer.java
--
diff --git 
a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/CachingAuthorizer.java
 
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/CachingAuthorizer.java
new file mode 100644
index 000..016ae74
--- /dev/null
+++ 
b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/CachingAuthorizer.java
@@ -0,0 +1,232 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agree