hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cnaur...@apache.org
Subject [1/2] hadoop git commit: HDFS-9286. HttpFs does not parse ACL syntax correctly for operation REMOVEACLENTRIES. Contributed by Wei-Chiu Chuang.
Date Thu, 22 Oct 2015 22:28:42 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 525a67a62 -> 4ee8297c8
  refs/heads/trunk 513ec3de1 -> 124a412a3


HDFS-9286. HttpFs does not parse ACL syntax correctly for operation REMOVEACLENTRIES. Contributed
by Wei-Chiu Chuang.


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

Branch: refs/heads/trunk
Commit: 124a412a3711bd42eaeebe531376004c739a15d6
Parents: 513ec3d
Author: cnauroth <cnauroth@apache.org>
Authored: Thu Oct 22 15:25:10 2015 -0700
Committer: cnauroth <cnauroth@apache.org>
Committed: Thu Oct 22 15:25:10 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/fs/http/server/FSOperations.java     | 2 +-
 .../org/apache/hadoop/fs/http/client/BaseTestHttpFSWith.java    | 3 ++-
 .../java/org/apache/hadoop/fs/http/server/TestHttpFSServer.java | 3 ++-
 .../apache/hadoop/fs/http/server/TestHttpFSServerNoACLs.java    | 5 +++--
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                     | 3 +++
 5 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/124a412a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java
b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java
index 11cdb4d..57bf025 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java
@@ -1025,7 +1025,7 @@ public class FSOperations {
      */
     public FSRemoveAclEntries(String path, String aclSpec) {
       this.path = new Path(path);
-      this.aclEntries = AclEntry.parseAclSpec(aclSpec, true);
+      this.aclEntries = AclEntry.parseAclSpec(aclSpec, false);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/hadoop/blob/124a412a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/client/BaseTestHttpFSWith.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/client/BaseTestHttpFSWith.java
b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/client/BaseTestHttpFSWith.java
index 0e082cc..575a477 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/client/BaseTestHttpFSWith.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/client/BaseTestHttpFSWith.java
@@ -738,6 +738,7 @@ public abstract class BaseTestHttpFSWith extends HFSTestCase {
     }
 
     final String aclUser1 = "user:foo:rw-";
+    final String rmAclUser1 = "user:foo:";
     final String aclUser2 = "user:bar:r--";
     final String aclGroup1 = "group::r--";
     final String aclSet = "user::rwx," + aclUser1 + ","
@@ -765,7 +766,7 @@ public abstract class BaseTestHttpFSWith extends HFSTestCase {
     httpfsAclStat = httpfs.getAclStatus(path);
     assertSameAcls(httpfsAclStat, proxyAclStat);
 
-    httpfs.removeAclEntries(path, AclEntry.parseAclSpec(aclUser1, true));
+    httpfs.removeAclEntries(path, AclEntry.parseAclSpec(rmAclUser1, false));
     proxyAclStat = proxyFs.getAclStatus(path);
     httpfsAclStat = httpfs.getAclStatus(path);
     assertSameAcls(httpfsAclStat, proxyAclStat);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/124a412a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSServer.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSServer.java
b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSServer.java
index 14b7a43..c6a7a9d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSServer.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSServer.java
@@ -501,12 +501,13 @@ public class TestHttpFSServer extends HFSTestCase {
   @TestHdfs
   public void testFileAcls() throws Exception {
     final String aclUser1 = "user:foo:rw-";
+    final String remAclUser1 = "user:foo:";
     final String aclUser2 = "user:bar:r--";
     final String aclGroup1 = "group::r--";
     final String aclSpec = "aclspec=user::rwx," + aclUser1 + ","
             + aclGroup1 + ",other::---";
     final String modAclSpec = "aclspec=" + aclUser2;
-    final String remAclSpec = "aclspec=" + aclUser1;
+    final String remAclSpec = "aclspec=" + remAclUser1;
     final String dir = "/aclFileTest";
     final String path = dir + "/test";
     String statusJson;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/124a412a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSServerNoACLs.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSServerNoACLs.java
b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSServerNoACLs.java
index 8f95a90..cadec2e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSServerNoACLs.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/server/TestHttpFSServerNoACLs.java
@@ -243,12 +243,13 @@ public class TestHttpFSServerNoACLs extends HTestCase {
   @TestJetty
   public void testWithNoAcls() throws Exception {
     final String aclUser1 = "user:foo:rw-";
+    final String rmAclUser1 = "user:foo:";
     final String aclUser2 = "user:bar:r--";
     final String aclGroup1 = "group::r--";
     final String aclSpec = "aclspec=user::rwx," + aclUser1 + ","
             + aclGroup1 + ",other::---";
     final String modAclSpec = "aclspec=" + aclUser2;
-    final String remAclSpec = "aclspec=" + aclUser1;
+    final String remAclSpec = "aclspec=" + rmAclUser1;
     final String defUser1 = "default:user:glarch:r-x";
     final String defSpec1 = "aclspec=" + defUser1;
     final String dir = "/noACLs";
@@ -278,4 +279,4 @@ public class TestHttpFSServerNoACLs extends HTestCase {
 
     miniDfs.shutdown();
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/124a412a/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 819534e..d82cdb8 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -2114,6 +2114,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-9273. ACLs on root directory may be lost after NN restart.
     (Xiao Chen via cnauroth)
 
+    HDFS-9286. HttpFs does not parse ACL syntax correctly for operation
+    REMOVEACLENTRIES. (Wei-Chiu Chuang via cnauroth)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES


Mime
View raw message