This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new a2acde5618 [hotfix] Use deleteDirectoryQuietly in 
TempFileCommitter.clean
a2acde5618 is described below

commit a2acde5618694c9ccbc8ea94e92755ce75f1f220
Author: JingsongLi <[email protected]>
AuthorDate: Mon Nov 3 20:04:53 2025 +0800

    [hotfix] Use deleteDirectoryQuietly in TempFileCommitter.clean
---
 .../org/apache/paimon/fs/RenamingTwoPhaseOutputStream.java    | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git 
a/paimon-common/src/main/java/org/apache/paimon/fs/RenamingTwoPhaseOutputStream.java
 
b/paimon-common/src/main/java/org/apache/paimon/fs/RenamingTwoPhaseOutputStream.java
index 7518f4cf49..cccf731bff 100644
--- 
a/paimon-common/src/main/java/org/apache/paimon/fs/RenamingTwoPhaseOutputStream.java
+++ 
b/paimon-common/src/main/java/org/apache/paimon/fs/RenamingTwoPhaseOutputStream.java
@@ -93,14 +93,14 @@ public class RenamingTwoPhaseOutputStream extends 
TwoPhaseOutputStream {
     }
 
     /** Committer implementation that renames temporary file to target path. */
-    public static class TempFileCommitter implements Committer {
+    private static class TempFileCommitter implements Committer {
 
         private static final long serialVersionUID = 1L;
 
         private final Path tempPath;
         private final Path targetPath;
 
-        public TempFileCommitter(Path tempPath, Path targetPath) {
+        private TempFileCommitter(Path tempPath, Path targetPath) {
             this.tempPath = tempPath;
             this.targetPath = targetPath;
         }
@@ -135,11 +135,8 @@ public class RenamingTwoPhaseOutputStream extends 
TwoPhaseOutputStream {
         }
 
         @Override
-        public void clean(FileIO fileIO) throws IOException {
-            Path path = tempPath.getParent();
-            if (fileIO.exists(path)) {
-                fileIO.deleteQuietly(path);
-            }
+        public void clean(FileIO fileIO) {
+            fileIO.deleteDirectoryQuietly(tempPath.getParent());
         }
     }
 }

Reply via email to