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

czy006 pushed a commit to branch 0.9.x
in repository https://gitbox.apache.org/repos/asf/amoro.git

commit 4eccf215f1a86e8f8a23af93531f4090cd688d5f
Author: WenLingzhang <[email protected]>
AuthorDate: Tue May 19 21:32:16 2026 +0800

    [hotfix] Unify action names, pool names, and constants for 
SnapshotsExpiringProcess and OrphanFilesCleaningProcess (#4225)
    
    Unify action names, pool names, and constants for SnapshotsExpiringProcess 
and OrphanFilesCleaningProcess
    
    Co-authored-by: 张文领 <[email protected]>
    (cherry picked from commit 467930937fde7c2b3a6e7ef5e4f479104997872b)
---
 .../amoro/server/process/iceberg/IcebergProcessFactory.java   |  8 ++++----
 .../server/process/iceberg/OrphanFilesCleaningProcess.java    |  2 +-
 .../server/process/iceberg/TestIcebergProcessFactory.java     | 11 +++++------
 .../src/main/java/org/apache/amoro/IcebergActions.java        |  2 +-
 .../org/apache/amoro/process/TestLocalExecutionEngine.java    |  8 ++++----
 dist/src/main/amoro-bin/conf/plugins/execute-engines.yaml     |  6 +++---
 docs/admin-guides/deployment.md                               |  4 ++--
 7 files changed, 20 insertions(+), 21 deletions(-)

diff --git 
a/amoro-ams/src/main/java/org/apache/amoro/server/process/iceberg/IcebergProcessFactory.java
 
b/amoro-ams/src/main/java/org/apache/amoro/server/process/iceberg/IcebergProcessFactory.java
index be94f9a55..c90fcde83 100755
--- 
a/amoro-ams/src/main/java/org/apache/amoro/server/process/iceberg/IcebergProcessFactory.java
+++ 
b/amoro-ams/src/main/java/org/apache/amoro/server/process/iceberg/IcebergProcessFactory.java
@@ -113,7 +113,7 @@ public class IcebergProcessFactory implements 
ProcessFactory {
 
     if (IcebergActions.EXPIRE_SNAPSHOTS.equals(action)) {
       return triggerExpireSnapshot(tableRuntime);
-    } else if (IcebergActions.DELETE_ORPHANS.equals(action)) {
+    } else if (IcebergActions.CLEAN_ORPHAN.equals(action)) {
       return triggerCleanOrphans(tableRuntime);
     } else if (IcebergActions.CLEAN_DANGLING_DELETE.equals(action)) {
       return triggerCleanDanglingDelete(tableRuntime);
@@ -141,7 +141,7 @@ public class IcebergProcessFactory implements 
ProcessFactory {
     // The store/processId/tracking is owned by ProcessService.
     if (IcebergActions.EXPIRE_SNAPSHOTS.equals(action)) {
       return new SnapshotsExpiringProcess(tableRuntime, localEngine);
-    } else if (IcebergActions.DELETE_ORPHANS.equals(action)) {
+    } else if (IcebergActions.CLEAN_ORPHAN.equals(action)) {
       return new OrphanFilesCleaningProcess(tableRuntime, localEngine);
     } else if (IcebergActions.CLEAN_DANGLING_DELETE.equals(action)) {
       return new DanglingDeleteFilesCleaningProcess(tableRuntime, localEngine);
@@ -168,7 +168,7 @@ public class IcebergProcessFactory implements 
ProcessFactory {
     if (configs.getBoolean(ORPHAN_FILES_CLEANING_ENABLED)) {
       Duration interval = configs.getDuration(ORPHAN_FILES_CLEANING_INTERVAL);
       this.actions.put(
-          IcebergActions.DELETE_ORPHANS, 
ProcessTriggerStrategy.triggerAtFixRate(interval));
+          IcebergActions.CLEAN_ORPHAN, 
ProcessTriggerStrategy.triggerAtFixRate(interval));
     }
 
     if (configs.getBoolean(DANGLING_DELETE_FILES_CLEANING_ENABLED)) {
@@ -206,7 +206,7 @@ public class IcebergProcessFactory implements 
ProcessFactory {
 
     long lastExecuteTime =
         
tableRuntime.getState(DefaultTableRuntime.CLEANUP_STATE_KEY).getLastOrphanFilesCleanTime();
-    ProcessTriggerStrategy strategy = 
actions.get(IcebergActions.DELETE_ORPHANS);
+    ProcessTriggerStrategy strategy = actions.get(IcebergActions.CLEAN_ORPHAN);
     if (System.currentTimeMillis() - lastExecuteTime < 
strategy.getTriggerInterval().toMillis()) {
       return Optional.empty();
     }
diff --git 
a/amoro-ams/src/main/java/org/apache/amoro/server/process/iceberg/OrphanFilesCleaningProcess.java
 
b/amoro-ams/src/main/java/org/apache/amoro/server/process/iceberg/OrphanFilesCleaningProcess.java
index b17f44f2c..3c04c58b1 100644
--- 
a/amoro-ams/src/main/java/org/apache/amoro/server/process/iceberg/OrphanFilesCleaningProcess.java
+++ 
b/amoro-ams/src/main/java/org/apache/amoro/server/process/iceberg/OrphanFilesCleaningProcess.java
@@ -65,7 +65,7 @@ public class OrphanFilesCleaningProcess extends TableProcess 
implements LocalPro
 
   @Override
   public Action getAction() {
-    return IcebergActions.DELETE_ORPHANS;
+    return IcebergActions.CLEAN_ORPHAN;
   }
 
   @Override
diff --git 
a/amoro-ams/src/test/java/org/apache/amoro/server/process/iceberg/TestIcebergProcessFactory.java
 
b/amoro-ams/src/test/java/org/apache/amoro/server/process/iceberg/TestIcebergProcessFactory.java
index 362165b45..1f1f57ca7 100644
--- 
a/amoro-ams/src/test/java/org/apache/amoro/server/process/iceberg/TestIcebergProcessFactory.java
+++ 
b/amoro-ams/src/test/java/org/apache/amoro/server/process/iceberg/TestIcebergProcessFactory.java
@@ -49,8 +49,7 @@ public class TestIcebergProcessFactory {
   @Test
   public void testOpenAndSupportedActions() {
     assertSupportedAction("expire-snapshots", IcebergActions.EXPIRE_SNAPSHOTS, 
Duration.ofHours(1));
-    assertSupportedAction(
-        "clean-orphan-files", IcebergActions.DELETE_ORPHANS, 
Duration.ofHours(24));
+    assertSupportedAction("clean-orphan-files", IcebergActions.CLEAN_ORPHAN, 
Duration.ofHours(24));
     assertSupportedAction(
         "clean-dangling-delete-files", IcebergActions.CLEAN_DANGLING_DELETE, 
Duration.ofHours(24));
     assertSupportedAction("expire-data", IcebergActions.EXPIRE_DATA, 
Duration.ofHours(24));
@@ -61,7 +60,7 @@ public class TestIcebergProcessFactory {
     assertTriggerWhenDue(
         "expire-snapshots", IcebergActions.EXPIRE_SNAPSHOTS, 
SnapshotsExpiringProcess.class, 0);
     assertTriggerWhenDue(
-        "clean-orphan-files", IcebergActions.DELETE_ORPHANS, 
OrphanFilesCleaningProcess.class, 0);
+        "clean-orphan-files", IcebergActions.CLEAN_ORPHAN, 
OrphanFilesCleaningProcess.class, 0);
     assertTriggerWhenDue(
         "clean-dangling-delete-files",
         IcebergActions.CLEAN_DANGLING_DELETE,
@@ -75,7 +74,7 @@ public class TestIcebergProcessFactory {
     assertTriggerNotDue(
         "expire-snapshots", IcebergActions.EXPIRE_SNAPSHOTS, 
System.currentTimeMillis());
     assertTriggerNotDue(
-        "clean-orphan-files", IcebergActions.DELETE_ORPHANS, 
System.currentTimeMillis());
+        "clean-orphan-files", IcebergActions.CLEAN_ORPHAN, 
System.currentTimeMillis());
     assertTriggerNotDue(
         "clean-dangling-delete-files",
         IcebergActions.CLEAN_DANGLING_DELETE,
@@ -86,7 +85,7 @@ public class TestIcebergProcessFactory {
   @Test
   public void testTriggerActionDisabled() {
     assertTriggerDisabled("expire-snapshots", IcebergActions.EXPIRE_SNAPSHOTS, 
false, 0);
-    assertTriggerDisabled("clean-orphan-files", IcebergActions.DELETE_ORPHANS, 
false, 0);
+    assertTriggerDisabled("clean-orphan-files", IcebergActions.CLEAN_ORPHAN, 
false, 0);
     assertTriggerDisabled(
         "clean-dangling-delete-files", IcebergActions.CLEAN_DANGLING_DELETE, 
false, 0);
     assertTriggerDisabled("expire-data", IcebergActions.EXPIRE_DATA, false, 0);
@@ -101,7 +100,7 @@ public class TestIcebergProcessFactory {
   @Test
   public void testRecoverOrphanFilesCleaningProcess() {
     assertRecover(
-        "clean-orphan-files", IcebergActions.DELETE_ORPHANS, 
OrphanFilesCleaningProcess.class);
+        "clean-orphan-files", IcebergActions.CLEAN_ORPHAN, 
OrphanFilesCleaningProcess.class);
   }
 
   @Test
diff --git a/amoro-common/src/main/java/org/apache/amoro/IcebergActions.java 
b/amoro-common/src/main/java/org/apache/amoro/IcebergActions.java
index da1791e93..3314187d0 100644
--- a/amoro-common/src/main/java/org/apache/amoro/IcebergActions.java
+++ b/amoro-common/src/main/java/org/apache/amoro/IcebergActions.java
@@ -25,7 +25,7 @@ public class IcebergActions {
 
   public static final Action SYSTEM = Action.register("system");
   public static final Action REWRITE = Action.register("rewrite");
-  public static final Action DELETE_ORPHANS = 
Action.register("delete-orphans");
+  public static final Action CLEAN_ORPHAN = 
Action.register("clean-orphan-files");
   public static final Action SYNC_HIVE = Action.register("sync-hive");
   public static final Action EXPIRE_DATA = Action.register("expire-data");
   public static final Action EXPIRE_SNAPSHOTS = 
Action.register("expire-snapshots");
diff --git 
a/amoro-common/src/test/java/org/apache/amoro/process/TestLocalExecutionEngine.java
 
b/amoro-common/src/test/java/org/apache/amoro/process/TestLocalExecutionEngine.java
index e85f96085..7ffa2a98b 100644
--- 
a/amoro-common/src/test/java/org/apache/amoro/process/TestLocalExecutionEngine.java
+++ 
b/amoro-common/src/test/java/org/apache/amoro/process/TestLocalExecutionEngine.java
@@ -45,8 +45,8 @@ public class TestLocalExecutionEngine {
 
   @Test
   public void testSubmitUsesCustomPoolByTag() throws Exception {
-    assertCustomPoolByTag("snapshots-expiring");
-    assertCustomPoolByTag("orphan-files-cleaning");
+    assertCustomPoolByTag("expire-snapshots");
+    assertCustomPoolByTag("clean-orphan-files");
     assertCustomPoolByTag("clean-dangling-delete-files");
     assertCustomPoolByTag("expire-data");
   }
@@ -154,8 +154,8 @@ public class TestLocalExecutionEngine {
     LocalExecutionEngine localEngine = new LocalExecutionEngine();
     Map<String, String> properties = new HashMap<>();
     properties.put("pool.default.thread-count", "1");
-    properties.put("pool.snapshots-expiring.thread-count", "1");
-    properties.put("pool.orphan-files-cleaning.thread-count", "1");
+    properties.put("pool.expire-snapshots.thread-count", "1");
+    properties.put("pool.clean-orphan-files.thread-count", "1");
     properties.put("pool.clean-dangling-delete-files.thread-count", "1");
     properties.put("pool.expire-data.thread-count", "1");
     properties.put("process.status.ttl", ttl);
diff --git a/dist/src/main/amoro-bin/conf/plugins/execute-engines.yaml 
b/dist/src/main/amoro-bin/conf/plugins/execute-engines.yaml
index 1dfde29eb..9cd9aa6b9 100755
--- a/dist/src/main/amoro-bin/conf/plugins/execute-engines.yaml
+++ b/dist/src/main/amoro-bin/conf/plugins/execute-engines.yaml
@@ -21,7 +21,7 @@ execute-engines:
     priority: 100
     properties:
       pool.default.thread-count: 10
-      pool.snapshots-expiring.thread-count: 10
-      pool.orphan-files-cleaning.thread-count: 10
+      pool.expire-snapshots.thread-count: 10
+      pool.clean-orphan-files.thread-count: 10
       pool.clean-dangling-delete-files.thread-count: 10
-      pool.expire-data.thread-count: 10
+      pool.expire-data.thread-count: 10
\ No newline at end of file
diff --git a/docs/admin-guides/deployment.md b/docs/admin-guides/deployment.md
index e99fb984e..3ce65c2e4 100644
--- a/docs/admin-guides/deployment.md
+++ b/docs/admin-guides/deployment.md
@@ -306,8 +306,8 @@ execute-engines:
     priority: 100
     properties:
       pool.default.thread-count: 10                   # default thread pool 
size
-      pool.snapshots-expiring.thread-count: 10        # thread pool for 
snapshot expiration
-      pool.orphan-files-cleaning.thread-count: 10     # thread pool for orphan 
file cleaning
+      pool.expire-snapshots.thread-count: 10        # thread pool for snapshot 
expiration
+      pool.clean-orphan-files.thread-count: 10     # thread pool for orphan 
file cleaning
       pool.clean-dangling-delete-files.thread-count: 10     # thread pool for 
dangling delete files cleaning
       pool.expire-data.thread-count: 10               # thread pool for data 
expiration
       process.status.ttl: 4h                          # TTL for process status 
cache

Reply via email to