xiaoyuyao commented on a change in pull request #683:
URL: https://github.com/apache/hadoop-ozone/pull/683#discussion_r420887493



##########
File path: 
hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java
##########
@@ -703,6 +708,43 @@ public String toString() {
         + "}";
   }
 
+  /**
+   * Gets the ACL of a key.
+   *
+   * @param path Path to get
+   * @return AclStatus describing the ACL of the key
+   * @throws IOException if an ACL could not be read
+   * @throws UnsupportedOperationException if the operation is unsupported
+   *         (default outcome).
+   */
+  @Override
+  public AclStatus getAclStatus(Path path) throws IOException {
+    Map<String, List<OzoneAcl>> ozoneAcls = adapter.getAcls(pathToKey(path));
+    String userAcls =
+        ozoneAcls.get(ACLIdentityType.USER.toString()).toString();
+    String groupAcls =
+        ozoneAcls.get(ACLIdentityType.GROUP.toString()).toString();
+    return new AclStatus.Builder()
+            .owner(userAcls)
+            .group(groupAcls)
+            .build();
+  }
+
+  /**
+   * Fully replaces ACL of a key, discarding all existing entries.
+   *
+   * @param path Path to modify
+   * @param aclSpec List describing modifications, which must include entries
+   *   for user, group for compatibility with permission bits.
+   * @throws IOException if an ACL could not be modified
+   * @throws UnsupportedOperationException if the operation is unsupported
+   *         (default outcome).
+   */
+  @Override
+  public void setAcl(Path path, List<AclEntry> aclSpec) throws IOException {

Review comment:
       OzoneAcl currently does not support MASK acl. But I don't think we 
should put the Ozone user/group acl into owner and group string here. Instead, 
they should be mapped to AclStatus as List<AclEntry>.




----------------------------------------------------------------
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]



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

Reply via email to