[
https://issues.apache.org/jira/browse/HDDS-1541?focusedWorklogId=253916&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-253916
]
ASF GitHub Bot logged work on HDDS-1541:
----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Jun/19 18:30
Start Date: 04/Jun/19 18:30
Worklog Time Spent: 10m
Work Description: xiaoyuyao commented on pull request #885: HDDS-1541.
Implement addAcl,removeAcl,setAcl,getAcl for Key. Contributed by Ajay Kumat.
URL: https://github.com/apache/hadoop/pull/885#discussion_r290435514
##########
File path:
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmOzoneAclMap.java
##########
@@ -105,7 +115,21 @@ public void removeAcl(OzoneAcl acl) throws OMException {
Objects.requireNonNull(acl, "Acl should not be null.");
OzoneAclType aclType = OzoneAclType.valueOf(acl.getType().name());
if (getMap(aclType).containsKey(acl.getName())) {
- getMap(aclType).remove(acl.getName());
+ BitSet aclRights = getMap(aclType).get(acl.getName());
+ BitSet bits = (BitSet) acl.getAclBitSet().clone();
+ bits.and(aclRights);
+
+ if (bits.equals(ZERO_BITSET)) {
+ // throw exception if acl is already added.
Review comment:
comments does not match with code.
----------------------------------------------------------------
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: 253916)
Time Spent: 78h 40m (was: 78.5h)
> Implement addAcl,removeAcl,setAcl,getAcl for Key
> -------------------------------------------------
>
> Key: HDDS-1541
> URL: https://issues.apache.org/jira/browse/HDDS-1541
> Project: Hadoop Distributed Data Store
> Issue Type: Sub-task
> Reporter: Ajay Kumar
> Assignee: Ajay Kumar
> Priority: Major
> Labels: pull-request-available
> Time Spent: 78h 40m
> Remaining Estimate: 0h
>
> Implement addAcl,removeAcl,setAcl,getAcl for Key
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]