You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/08/19 21:07:20 UTC

[GitHub] [ozone] kerneltime commented on a diff in pull request #3687: HDDS-7132. GetFileStatus returns NULL for some paths.

kerneltime commented on code in PR #3687:
URL: https://github.com/apache/ozone/pull/3687#discussion_r950558040


##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java:
##########
@@ -759,6 +759,8 @@ public FileStatus getFileStatus(Path f) throws IOException {
       if (ex.getResult().equals(OMException.ResultCodes.KEY_NOT_FOUND)) {
         throw new FileNotFoundException("File not found. path:" + f);
       }
+      LOG.warn("GetFileStatus failed for path {}", f, ex);

Review Comment:
   To be consistent with the signature for this interface, `catch (IOException ex)` instead of `catch (OMException ex)`. 
   
   I am not sure if the underlying implementation is guaranteed to always throw `OMException`.  For other non `IOExceptions` exceptions, it might be better to map others as to `IOException` as well. 



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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