devmadhuu commented on code in PR #6195:
URL: https://github.com/apache/ozone/pull/6195#discussion_r1483921073
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -609,16 +609,20 @@ public ListKeysResult listKeys(String volumeName, String
bucketName,
int maxKeys) throws IOException {
Preconditions.checkNotNull(volumeName);
Preconditions.checkNotNull(bucketName);
-
+ OmBucketInfo omBucketInfo = metadataManager.validateBucket(volumeName,
bucketName);
Review Comment:
> There is already a method KeyManagerImpl#getBucketInfo which does this, We
can check null after getting the bucketInfo instead of adding a new method and
implementation. Also I think we can only do this once instead of again checking
in metadataManager#listKeys
Thanks @sadanand48 , I have done the changes to use
KeyManagerImpl#getBucketInfo. But we will have to do check in
metadataManager#listKeys also as this method is not just called by
KeyManagerImpl#listKeys, but also called by other callers as earlier.
--
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]