hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (HDDS-1538) Update ozone protobuf message for ACLs
Date Mon, 20 May 2019 21:29:01 GMT

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

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

                Author: ASF GitHub Bot
            Created on: 20/May/19 21:28
            Start Date: 20/May/19 21:28
    Worklog Time Spent: 10m 
      Work Description: xiaoyuyao commented on pull request #828: HDDS-1538. Update ozone
protobuf message for ACLs. Contributed by Ajay Kumar.
URL: https://github.com/apache/hadoop/pull/828#discussion_r285775332
 
 

 ##########
 File path: hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/protocolPB/OMPBHelper.java
 ##########
 @@ -72,24 +81,19 @@ public static OzoneAclInfo convertOzoneAcl(OzoneAcl acl) {
     default:
       throw new IllegalArgumentException("ACL type is not recognized");
     }
-    OzoneAclInfo.OzoneAclRights aclRights;
-    switch(acl.getRights()) {
-    case READ:
-      aclRights = OzoneAclRights.READ;
-      break;
-    case WRITE:
-      aclRights = OzoneAclRights.WRITE;
-      break;
-    case READ_WRITE:
-      aclRights = OzoneAclRights.READ_WRITE;
-      break;
-    default:
-      throw new IllegalArgumentException("ACL right is not recognized");
+    List<OzoneAclRights> aclRights = new ArrayList<>();
+
+    for(ACLType right: acl.getRights()) {
+      try {
+        aclRights.add(OzoneAclRights.valueOf(right.name()));
+      } catch (IllegalArgumentException iae) {
+        LOG.error("ACL:{} right is not recognized.", acl);
 
 Review comment:
   Agree with @anuengineer based on offline discussion with @ajayydv . We should stop here
instead of catch and let the parsing continue. 
 
----------------------------------------------------------------
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


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

    Worklog Id:     (was: 245566)
    Time Spent: 3h 40m  (was: 3.5h)

> Update ozone protobuf message for ACLs
> --------------------------------------
>
>                 Key: HDDS-1538
>                 URL: https://issues.apache.org/jira/browse/HDDS-1538
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Ajay Kumar
>            Assignee: Ajay Kumar
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.4.1
>
>          Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> Update ozone protobuf message for ACLs



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

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


Mime
View raw message