You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/08/23 19:13:17 UTC

[GitHub] [hadoop] xiaoyuyao commented on a change in pull request #1315: HDDS-1975. Implement default acls for bucket/volume/key for OM HA code.

xiaoyuyao commented on a change in pull request #1315: HDDS-1975. Implement default acls for bucket/volume/key for OM HA code.
URL: https://github.com/apache/hadoop/pull/1315#discussion_r317268149
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketCreateRequest.java
 ##########
 @@ -205,6 +215,26 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
   }
 
 
+  /**
+   * Add default acls for bucket. These acls are inherited from volume
+   * default acl list.
+   * @param omBucketInfo
+   * @param omVolumeArgs
+   */
+  private void addDefaultAcls(OmBucketInfo omBucketInfo,
+      OmVolumeArgs omVolumeArgs) {
+    // Add default acls from volume.
+    List<OzoneAcl> acls = new ArrayList<>();
+    if (omBucketInfo.getAcls() != null) {
+      acls.addAll(omBucketInfo.getAcls());
+    }
+    omVolumeArgs.getAclMap().getDefaultAclList().forEach(
+        defaultAcl -> acls.add(
 
 Review comment:
   Simple add does not merge acl properly. You can use OzoneAclUtil.inheritDefaultAcls(acls, omVolumeArgs.getAclMap().getDefaultAclList()) to do the merge.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org