ayushtkn commented on code in PR #5990:
URL: https://github.com/apache/hive/pull/5990#discussion_r2242161095


##########
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:
   So, can't we fix that in ``executeCallable``, It has a catch block
   ```
   } catch (Exception e) {
           if (this.failOnParentExceptions.stream().noneMatch(k -> 
k.isAssignableFrom(e.getClass()))
             && this.failOn.stream().noneMatch(k -> e.getClass().equals(k))
             && this.retryOn.stream().anyMatch(k -> 
e.getClass().isAssignableFrom(k))) {
             if (elapsedTimeInSeconds(startTime) + delay > 
this.totalDurationInSeconds) {
               // case where waiting would go beyond max duration. So throw 
exception and return
               throw e;
             }
   ```
   
   in that play with ``k -> k.isAssignableFrom(e.getClass())`` & check if the 
exception doesn't have anyone of the exceptions mentioned in 
`failOnParentExceptions` wrapped inside it?



-- 
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