This is an automated email from the ASF dual-hosted git repository. roryqi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push: new 08e739708 [#2346] Improvement: Fix the warning that delete(Path) in FileSystem has been deprecated (#2347) 08e739708 is described below commit 08e739708ac8b855fba5840e23f237effc42f4e7 Author: Neo Chien <cchung1...@cs.ccu.edu.tw> AuthorDate: Wed Jan 22 11:26:34 2025 +0800 [#2346] Improvement: Fix the warning that delete(Path) in FileSystem has been deprecated (#2347) ### What changes were proposed in this pull request? Fix the warning that delete(Path) in FileSystem has been deprecated ### Why are the changes needed? Fix: #2346 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? current UT --- .../java/org/apache/uniffle/coordinator/SimpleClusterManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java b/coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java index 1bd73dbe4..d1daf565b 100644 --- a/coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java +++ b/coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java @@ -235,7 +235,7 @@ public class SimpleClusterManager implements ClusterManager { String tempExcludedNodesPath = excludedNodesPath.concat("_tmp"); Path tmpHadoopPath = new Path(tempExcludedNodesPath); if (hadoopFileSystem.exists(tmpHadoopPath)) { - hadoopFileSystem.delete(tmpHadoopPath); + hadoopFileSystem.delete(tmpHadoopPath, true); } try (BufferedWriter bufferedWriter = new BufferedWriter( @@ -246,7 +246,7 @@ public class SimpleClusterManager implements ClusterManager { bufferedWriter.newLine(); } } - hadoopFileSystem.delete(hadoopPath); + hadoopFileSystem.delete(hadoopPath, true); hadoopFileSystem.rename(tmpHadoopPath, hadoopPath); } }