SaketaChalamchala commented on code in PR #9784:
URL: https://github.com/apache/ozone/pull/9784#discussion_r2835321101
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/OmSnapshotUtils.java:
##########
@@ -70,9 +75,15 @@ public static String truncateFileName(int truncateLength,
Path file) {
* @throws IOException if an I/O error occurs
*/
public static String getFileInodeAndLastModifiedTimeString(Path file) throws
IOException {
- Object inode = getINode(file);
- FileTime mTime = Files.getLastModifiedTime(file);
- return String.format("%s-%s", inode, mTime.toMillis());
+ Object inode;
+ try {
+ inode = getINode(file);
+ FileTime mTime = Files.getLastModifiedTime(file);
+ return String.format("%s-%s", inode, mTime.toMillis());
+ } catch (NoSuchFileException e) {
Review Comment:
Same comment as above.
I think instead of handling the error in the util function we should let the
caller, in our case the inode based checkpoint servlet handle the exception.
--
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]