[ 
https://issues.apache.org/jira/browse/HDDS-1975?focusedWorklogId=300443&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-300443
 ]

ASF GitHub Bot logged work on HDDS-1975:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Aug/19 19:13
            Start Date: 23/Aug/19 19:13
    Worklog Time Spent: 10m 
      Work Description: xiaoyuyao commented on 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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 300443)
    Time Spent: 2h 10m  (was: 2h)

> Implement default acls for bucket/volume/key for OM HA code
> -----------------------------------------------------------
>
>                 Key: HDDS-1975
>                 URL: https://issues.apache.org/jira/browse/HDDS-1975
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.5.0
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> This Jira is to implement default ACLs for Ozone volume/bucket/key.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to