harshal-16 commented on code in PR #5990:
URL: https://github.com/apache/hive/pull/5990#discussion_r2268661141


##########
common/src/java/org/apache/hadoop/hive/common/FileUtils.java:
##########
@@ -843,6 +843,9 @@ public static boolean copy(FileSystem srcFS, Path[] srcs, 
FileSystem dstFS, Path
           if (!doIOUtilsCopyBytes(srcFS, srcFS.getFileStatus(src), dstFS, dst, 
deleteSource, overwrite, preserveXAttr, conf, copyStatistics)) {
             returnVal = false;
           }
+        } catch (FileNotFoundException var15) {
+          // Wrapping the FileNotFoundException in a new IOException and 
re-throw immediately.
+          throw new IOException("Copy operation failed", var15);

Review Comment:
   Without this, I can not check the getCause() in 
https://github.com/apache/hive/pull/5990/files#diff-2c8fade5555e7ddbbb285946c7916f432a7b1764ac3115d6272a95c0749003faR105
   As the existing implementation below at line no#851 just adds the message, 
and it loses the underlying cause object



-- 
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: gitbox-unsubscr...@hive.apache.org

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


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

Reply via email to