Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13042#discussion_r62793337
  
    --- Diff: 
common/network-common/src/main/java/org/apache/spark/network/util/JavaUtils.java
 ---
    @@ -79,14 +80,27 @@ public static String bytesToString(ByteBuffer b) {
         return Unpooled.wrappedBuffer(b).toString(StandardCharsets.UTF_8);
       }
     
    -  /*
    +  /**
        * Delete a file or directory and its contents recursively.
        * Don't follow directories if they are symlinks.
    -   * Throws an exception if deletion is unsuccessful.
    +   *
    +   * @param file Input file / dir to be deleted
    +   * @throws IOException if deletion is unsuccessful
        */
       public static void deleteRecursively(File file) throws IOException {
         if (file == null) { return; }
     
    +    // On Unix systems, use operating system command to run faster
    +    // If that does not work out, fallback to the Java native way
    +    if (SystemUtils.IS_OS_UNIX) {
    +      try {
    +        deleteRecursivelyForUnix(file);
    +        return;
    +      } catch (IOException e) {
    +        // ignore and fall back to the Java native way
    --- End diff --
    
    hm silent fallback isn't always the best idea. we should maybe at least log 
something.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to