xiaoyuyao commented on a change in pull request #1202: HDDS-1884. Support
Bucket ACL operations for OM HA.
URL: https://github.com/apache/hadoop/pull/1202#discussion_r311377872
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHA.java
##########
@@ -759,6 +768,140 @@ public void testReadRequest() throws Exception {
}
}
+ @Test
+ public void testAddBucketAcl() throws Exception {
+ OzoneBucket ozoneBucket = setupBucket();
+ String remoteUserName = "remoteUser";
+ OzoneAcl defaultUserAcl = new OzoneAcl(USER, remoteUserName,
+ READ, DEFAULT);
+
+ OzoneObj ozoneObj = OzoneObjInfo.Builder.newBuilder()
+ .setResType(OzoneObj.ResourceType.BUCKET)
+ .setStoreType(OzoneObj.StoreType.OZONE)
+ .setVolumeName(ozoneBucket.getVolumeName())
+ .setBucketName(ozoneBucket.getName()).build();
+
+ boolean addAcl = objectStore.addAcl(ozoneObj, defaultUserAcl);
+ Assert.assertTrue(addAcl);
+
+ ozoneBucket.addAcls(Collections.singletonList(defaultUserAcl));
Review comment:
We may need to remove OzoneBucket#addAcls API as it is the legacy impl based
on BucketManager#SetProperty. When we switch it to use setAcls(), the existing
acls are not preserved correctly. We could either rename this API to setAcls or
remove it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]