[ https://issues.apache.org/jira/browse/HDDS-1538?focusedWorklogId=245386&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-245386 ]
ASF GitHub Bot logged work on HDDS-1538: ---------------------------------------- Author: ASF GitHub Bot Created on: 20/May/19 17:53 Start Date: 20/May/19 17:53 Worklog Time Spent: 10m Work Description: ajayydv 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_r285703674 ########## 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: Since this involves a list of acls IMO a single bad acl type should not halt the usage of remaining ones. But i am open to change if you think we should throw error at this point. ---------------------------------------------------------------- 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: 245386) Time Spent: 2h 50m (was: 2h 40m) > 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: 2h 50m > 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org