xiaoyuyao commented on a change in pull request #2008:
URL: https://github.com/apache/ozone/pull/2008#discussion_r599031681



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileRequest.java
##########
@@ -607,11 +609,20 @@ public static OzoneFileStatus getOMKeyInfoIfExists(
       OMMetadataManager omMetadataMgr, String volumeName, String bucketName,
       String keyName, long scmBlockSize) throws IOException {
 
+    OMFileRequest.validateBucket(omMetadataMgr, volumeName, bucketName);
+
     Path keyPath = Paths.get(keyName);
     Iterator<Path> elements = keyPath.iterator();
     String bucketKey = omMetadataMgr.getBucketKey(volumeName, bucketName);
     OmBucketInfo omBucketInfo =
             omMetadataMgr.getBucketTable().get(bucketKey);
+    if (null == omBucketInfo) {

Review comment:
       Does validateBucket handle the non-exist bucket case?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to