SaketaChalamchala commented on code in PR #9784:
URL: https://github.com/apache/ozone/pull/9784#discussion_r2835316500
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/Archiver.java:
##########
@@ -137,7 +138,12 @@ public static long linkAndIncludeFile(File file, String
entryName,
File link = tmpDir.resolve(entryName).toFile();
long bytes = 0;
try {
- Files.createLink(link.toPath(), file.toPath());
+ try {
+ Files.createLink(link.toPath(), file.toPath());
+ } catch (NoSuchFileException noSuchFileException) {
Review Comment:
Thanks for the patch @sadanand48. Do we want to handle the
`NoSuchFileException` in the framework class? What if this function is called
by mutiple processed in the future.
I think we should throw the IOException if the hardlink creation fails and
let the caller handle the exception how it wants.
--
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]