danny0405 commented on code in PR #5859:
URL: https://github.com/apache/hudi/pull/5859#discussion_r896349614
##########
hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java:
##########
@@ -189,7 +189,11 @@ public static String getCommitTime(String fullFileName) {
}
public static long getFileSize(FileSystem fs, Path path) throws IOException {
- return fs.getFileStatus(path).getLen();
+ if (fs.exists(path)) {
+ return fs.getFileStatus(path).getLen();
+ } else {
+ return 0L;
+ }
Review Comment:
What is the context here ? Can we ensure the file must exist when calling
the `getFileSize`
--
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]