You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2017/07/12 10:07:54 UTC
hadoop git commit: HADOOP-14581. Restrict setOwner to list of user
when security is enabled in wasb. Contributed by Varada Hemeswari (fix for
java 7 compilation)
Repository: hadoop
Updated Branches:
refs/heads/branch-2 1e69e5260 -> 3dfd10707
HADOOP-14581. Restrict setOwner to list of user when security is enabled in wasb.
Contributed by Varada Hemeswari
(fix for java 7 compilation)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/3dfd1070
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/3dfd1070
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/3dfd1070
Branch: refs/heads/branch-2
Commit: 3dfd107070ac3c7877771c06c0915becbbca96ba
Parents: 1e69e52
Author: Steve Loughran <st...@apache.org>
Authored: Wed Jul 12 11:07:22 2017 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Wed Jul 12 11:07:22 2017 +0100
----------------------------------------------------------------------
.../TestNativeAzureFileSystemAuthorization.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3dfd1070/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/TestNativeAzureFileSystemAuthorization.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/TestNativeAzureFileSystemAuthorization.java b/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/TestNativeAzureFileSystemAuthorization.java
index 862fd48..7583199 100644
--- a/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/TestNativeAzureFileSystemAuthorization.java
+++ b/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/TestNativeAzureFileSystemAuthorization.java
@@ -688,7 +688,7 @@ public class TestNativeAzureFileSystemAuthorization
public void testSetOwnerThrowsForUnauthorisedUsers() throws Throwable {
expectedEx.expect(WasbAuthorizationException.class);
- Path testPath = new Path("/testSetOwnerNegative");
+ final Path testPath = new Path("/testSetOwnerNegative");
MockWasbAuthorizerImpl authorizer = new MockWasbAuthorizerImpl(fs);
authorizer.init(null);
authorizer.addAuthRule("/", WasbAuthorizationOperations.WRITE.toString(), true);
@@ -723,15 +723,15 @@ public class TestNativeAzureFileSystemAuthorization
* */
@Test
public void testSetOwnerSucceedsForAuthorisedUsers() throws Throwable {
- Path testPath = new Path("/testsetownerpositive");
+ final Path testPath = new Path("/testsetownerpositive");
MockWasbAuthorizerImpl authorizer = new MockWasbAuthorizerImpl(fs);
authorizer.init(null);
authorizer.addAuthRule("/", WasbAuthorizationOperations.WRITE.toString(), true);
authorizer.addAuthRule(testPath.toString(), WasbAuthorizationOperations.READ.toString(), true);
fs.updateWasbAuthorizer(authorizer);
- String newOwner = "newowner";
- String newGroup = "newgroup";
+ final String newOwner = "newowner";
+ final String newGroup = "newgroup";
UserGroupInformation authorisedUser = UserGroupInformation.createUserForTesting(
"user2", new String[]{"group1"});
@@ -767,7 +767,7 @@ public class TestNativeAzureFileSystemAuthorization
public void testSetOwnerSucceedsForAnyUserWhenWildCardIsSpecified() throws Throwable {
Configuration conf = fs.getConf();
conf.set(NativeAzureFileSystem.AZURE_CHOWN_USERLIST_PROPERTY_NAME, "*");
- Path testPath = new Path("/testsetownerpositivewildcard");
+ final Path testPath = new Path("/testsetownerpositivewildcard");
MockWasbAuthorizerImpl authorizer = new MockWasbAuthorizerImpl(fs);
authorizer.init(null);
@@ -775,8 +775,8 @@ public class TestNativeAzureFileSystemAuthorization
authorizer.addAuthRule(testPath.toString(), WasbAuthorizationOperations.READ.toString(), true);
fs.updateWasbAuthorizer(authorizer);
- String newOwner = "newowner";
- String newGroup = "newgroup";
+ final String newOwner = "newowner";
+ final String newGroup = "newgroup";
UserGroupInformation user = UserGroupInformation.createUserForTesting(
"anyuser", new String[]{"group1"});
@@ -813,7 +813,7 @@ public class TestNativeAzureFileSystemAuthorization
Configuration conf = fs.getConf();
conf.set(NativeAzureFileSystem.AZURE_CHOWN_USERLIST_PROPERTY_NAME, "user1, *");
- Path testPath = new Path("/testSetOwnerFailsForIllegalSetup");
+ final Path testPath = new Path("/testSetOwnerFailsForIllegalSetup");
MockWasbAuthorizerImpl authorizer = new MockWasbAuthorizerImpl(fs);
authorizer.init(null);
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org