whbing commented on code in PR #4738:
URL: https://github.com/apache/ozone/pull/4738#discussion_r1231055100


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java:
##########
@@ -307,6 +316,23 @@ protected List< OzoneAcl > getAclsForKey(KeyArgs keyArgs,
     return acls;
   }
 
+  /**
+   * Inherit parent's default acls and generate its own acls.
+   * @param keyArgs
+   * @param parentAcls
+   * @return Acls of inherited and its own
+   */
+  protected static List<OzoneAcl> buildAcls(KeyArgs keyArgs,
+      List<OzoneAcl> parentAcls) {
+    // inherit parent acls and convert to DEFAULT scope
+    List<OzoneAcl> acls = new ArrayList<>();
+    OzoneAclUtil.inheritDefaultAcls(acls, parentAcls);
+    OzoneAclUtil.toDefaultScope(acls);

Review Comment:
   > method itself will inherit only default acl, it seems no need set again 
toDefaultScope() and this method may not be useful
   
   @sumitagrawl  The current convention is ACLs which the directory inherits 
necessary to keep `DEFAULT` scope, except leaf file.  I added `toDefaultScope` 
without changing the basis `inheritDefaultAcls` method. How do you think about 
it? Thanks.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to