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

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

                Author: ASF GitHub Bot
            Created on: 20/Aug/19 16:49
            Start Date: 20/Aug/19 16:49
    Worklog Time Spent: 10m 
      Work Description: bharatviswa504 commented on pull request #1263: 
HDDS-1927. Consolidate add/remove Acl into OzoneAclUtil class. Contri…
URL: https://github.com/apache/hadoop/pull/1263#discussion_r315794716
 
 

 ##########
 File path: 
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyInfo.java
 ##########
 @@ -235,123 +231,22 @@ public FileEncryptionInfo getFileEncryptionInfo() {
     return encInfo;
   }
 
-  public List<OzoneAclInfo> getAcls() {
+  public List<OzoneAcl> getAcls() {
 
 Review comment:
   Thank You for info. Here we are only modifying acl depending on 
add/remove/set Acl. I think for this we can perform on protobuf structures. 
Like how it was done before in OmKeyInfo.java (add/remove/setAcl). As keeping 
in this way, we will avoid unnecessary protobuf conversions.
   If you feel this is the way to do, I am okay with it.
   
   And also this will not only help acls But bucket/key creation also, as now 
Bucket/KeyInfo will have proto buf -> internal Ozone object. This also can be 
avoided. (So, when each key creation we don't need to convert acls set during 
the creation of key from proto to OzoneAcl Objects.)
   
   > And also this will not only help acls But bucket/key creation also, as now 
Bucket/KeyInfo will have proto buf -> internal Ozone object. This also can be 
avoided. (So, when each key creation we don't need to convert acls set during 
the creation of key from proto to OzoneAcl Objects.)
   
   Because currently OmKeyInfo maintains direct protobuf structures, and even 
checkAccess uses the `List<OzoneAclInfo>` to checkAccess. So, I am not sure 
what additional changes this require, as this PR is changing from proto to 
OzoneAcl in OmKeyInfo.java. (My point is to do vice-versa)
   
   
   
 
----------------------------------------------------------------
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: 298027)
    Time Spent: 5h  (was: 4h 50m)

> Consolidate add/remove Acl into OzoneAclUtil class
> --------------------------------------------------
>
>                 Key: HDDS-1927
>                 URL: https://issues.apache.org/jira/browse/HDDS-1927
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>            Reporter: Bharat Viswanadham
>            Assignee: Xiaoyu Yao
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 5h
>  Remaining Estimate: 0h
>
> This Jira is created based on @xiaoyu comment on HDDS-1884
> Can we abstract these add/remove logic into common AclUtil class as we can 
> see similar logic in both bucket manager and key manager? For example,
> public static boolean addAcl(List existingAcls, OzoneAcl newAcl)
> public static boolean removeAcl(List existingAcls, OzoneAcl newAcl)
>  
> But to do this, we need both OmKeyInfo and OMBucketInfo to use list of 
> OzoneAcl/OzoneAclInfo.
> This Jira is to do that refactor, and also address above comment to move 
> common logic to AclUtils.



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