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

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

                Author: ASF GitHub Bot
            Created on: 29/May/19 18:45
            Start Date: 29/May/19 18:45
    Worklog Time Spent: 10m 
      Work Description: anuengineer commented on pull request #847: HDDS-1539. 
Implement addAcl,removeAcl,setAcl,getAcl for Volume. Contributed Ajay Kumar.
URL: https://github.com/apache/hadoop/pull/847#discussion_r288716284
 
 

 ##########
 File path: 
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/protocolPB/OMPBHelper.java
 ##########
 @@ -84,15 +84,14 @@ public static OzoneAclInfo convertOzoneAcl(OzoneAcl acl) {
     default:
       throw new IllegalArgumentException("ACL type is not recognized");
     }
-    List<OzoneAclRights> aclRights = new ArrayList<>();
-
-    for (ACLType right : acl.getRights()) {
-      aclRights.add(OzoneAclRights.valueOf(right.name()));
-    }
+    List<OzoneAclRights> ozAclRights =
+        new ArrayList<>(acl.getAclBitSet().cardinality());
+    acl.getAclBitSet().stream().forEach(a -> ozAclRights.add(
+        OzoneAclRights.valueOf(ACLType.values()[a].name())));
 
 
 Review comment:
   Many times, using normal for loops are much more efficient that lambda in 
Java. There is a huge perf cost. There was JIRA where Todd Lippcon replaced 
many lambdas in HDFS. so you might want to add a simple timer (start and stop) 
to make sure that these are equal in performance.
 
----------------------------------------------------------------
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]


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

    Worklog Id:     (was: 250368)
    Time Spent: 2h 50m  (was: 2h 40m)

> Implement addAcl,removeAcl,setAcl,getAcl for Volume
> ---------------------------------------------------
>
>                 Key: HDDS-1539
>                 URL: https://issues.apache.org/jira/browse/HDDS-1539
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Ajay Kumar
>            Assignee: Ajay Kumar
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Implement addAcl,removeAcl,setAcl,getAcl for Volume



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to