[
https://issues.apache.org/jira/browse/HDDS-1538?focusedWorklogId=244511&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-244511
]
ASF GitHub Bot logged work on HDDS-1538:
----------------------------------------
Author: ASF GitHub Bot
Created on: 18/May/19 09:38
Start Date: 18/May/19 09:38
Worklog Time Spent: 10m
Work Description: anuengineer 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_r285335993
##########
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:
This should be more than a LOG.Error? if we don't recognize an ACL shouldn't
we return an error to the caller instead of ignoring and 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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 244511)
Time Spent: 1h 20m (was: 1h 10m)
> 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: 1h 20m
> Remaining Estimate: 0h
>
> Update ozone protobuf message for ACLs
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]