harshal-16 commented on code in PR #5990: URL: https://github.com/apache/hive/pull/5990#discussion_r2242023296
########## common/src/java/org/apache/hadoop/hive/common/FileUtils.java: ########## @@ -830,7 +830,14 @@ public static boolean copy(FileSystem srcFS, Path[] srcs, FileSystem dstFS, Path throw new IOException("copying multiple files, but last argument `" + dst + "' is not a directory"); } } catch (FileNotFoundException var16) { - throw new IOException("`" + dst + "': specified destination directory does not exist", var16); + // Create a new FileNotFoundException with the custom message and the original message + FileNotFoundException e = new FileNotFoundException("'" + dst + "': specified destination directory does not exist"); Review Comment: Yes @ayushtkn , this copy function is used only by CopyUtils.copyFilesBetweenFS() which is specific to replication. For your suggestion about improving retryableFxn(), the problem is below is the current implementation. and if you see It retries on IOException, and because FileNotFoundException was wrapped inside IOException, it will not go to the catch block before getting stuck in the retry loop. `private <T> T retryableFxn(Callable<T> callable) throws IOException { Retryable retryable = Retryable.builder() .withHiveConf(hiveConf) .withRetryOnException(IOException.class).withFailOnParentExceptionList(failOnParentExceptionList).build(); try { return retryable.executeCallable(() -> callable.call()); } catch (Exception e) { if (failOnParentExceptionList.stream().anyMatch(k -> k.isAssignableFrom(e.getClass()))) { throw new IOException(e); } throw new IOException(ErrorMsg.REPL_FILE_SYSTEM_OPERATION_RETRY.getMsg(), e); } }` -- 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