rakeshadr commented on a change in pull request #2533:
URL: https://github.com/apache/ozone/pull/2533#discussion_r711940295
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/utils/OzoneManagerRatisUtils.java
##########
@@ -267,10 +302,13 @@ private static OMClientRequest getOMAclRequest(OMRequest
omRequest) {
} else if (ObjectType.BUCKET == type) {
return new OMBucketAddAclRequest(omRequest);
} else if (ObjectType.KEY == type) {
- if (isBucketFSOptimized()){
+ OMKeyAddAclRequest aclReq = new OMKeyAddAclRequest(omRequest);
+ OmBucketInfo buckInfo = aclReq.getBucketInfo(ozoneManager);
Review comment:
@aryangupta1998 Like we discussed for other client KeyRequests,
`bucketInfo` can be null. [Reference
comment](https://github.com/apache/ozone/pull/2533/files#r692388618)
Instead of returning BucketInfo, you can return BucketLayout.
Just rename method `OMKeyAclRequest.getBucketInfo` to
`OMKeyAclRequestgetBucketLayout` and then return Layout itself. Here, you can
handle bucketInfo null check and return BucketLayout.LEGACY.
For debugging purpose, please add warn log message saying that bucket
doesn't exists.
LOG.error("Bucket not found: {}/{} ", volumeName, bucketName);
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]