bharatviswa504 commented on a change in pull request #94: HDDS-2255. Improve Acl Handler Messages URL: https://github.com/apache/hadoop-ozone/pull/94#discussion_r339823849
########## File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/web/ozShell/keys/AddAclKeyHandler.java ########## @@ -91,10 +91,15 @@ public Void call() throws Exception { OzoneObj.StoreType.valueOf(storeType)) .build(); - boolean result = client.getObjectStore().addAcl(obj, + boolean aclExisted = client.getObjectStore().checkAclExist(obj, OzoneAcl.parseAcl(acl)); - - System.out.printf("%s%n", "Acl added successfully: " + result); + if (aclExisted) { + System.out.println("ACL already exists."); + } else { + boolean result = client.getObjectStore().addAcl(obj, Review comment: I think we don't need a checkAclExist addAcl semantic true, acl is added successfully, false means acl already exist that is why we cannot add it. So, no need of checkAclExist() ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org