Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/13042#discussion_r62820647 --- Diff: common/network-common/src/main/java/org/apache/spark/network/util/JavaUtils.java --- @@ -79,14 +80,32 @@ 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 IO way + if (SystemUtils.IS_OS_UNIX) { --- End diff -- Ah right, this is not somewhere that can use core. That's the same approach core uses already, so, LGTM. Yes, as a side point, the core module has fallen victim to the same problem it does in every project. It gets stuffed with miscellaneous code anytime something is needed in >1 module for convenience, rather than identify more specific new modules that need to be created to share dependencies, but soon becomes too heavy to be a dependency of everything and starts to fail in its purpose of hosting simple common code. You can see even "more core" modules trickling out into common/ now, as it kinda should have been.
--- 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