[AMORO-4208] Refactor orphan-files-cleaning via ProcessFactory plugin#4209
Conversation
# Conflicts: # amoro-common/src/test/java/org/apache/amoro/process/TestLocalExecutionEngine.java
2677e62 to
ded0027
Compare
| @@ -42,13 +41,6 @@ public static InlineTableExecutors getInstance() { | |||
| } | |||
There was a problem hiding this comment.
The old global configs in AmoroManagementConf are still present after this refactor:
// AmoroManagementConf.java
public static final ConfigOption<Boolean> CLEAN_ORPHAN_FILES_ENABLED = ...
public static final ConfigOption<Integer> CLEAN_ORPHAN_FILES_THREAD_COUNT = ...
public static final ConfigOption<Duration> CLEAN_ORPHAN_FILES_INTERVAL = ...And AmoroManagementConfValidator still validates them. Since the configuration has moved to process-factories.yaml, these entries are now dead code. They should either be removed or marked @Deprecated with a note pointing to the new config location, to avoid confusing users who upgrade and wonder why their old ams.yaml settings are silently ignored.
There was a problem hiding this comment.
Thanks for the review! The old CLEAN_ORPHAN_FILES_* configs in AmoroManagementConf and their validation in AmoroManagementConfValidator have already been removed in the follow-up commit . The configuration has been fully migrated to IcebergProcessFactory (process-factories.yaml) and documented in the deployment guide.
zhoujinsong
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the work!
Why are the changes needed?
Close #4208.
Brief change log
Refactor Iceberg orphanFiles cleaning from the inline scheduler into a pluggable process model (ProcessFactory + ExecuteEngine) refer to #4107 :
Implementation Plan
Create
OrphanFilesCleaningProcessTableProcessandLocalProcessinterfacesIcebergProcessFactorywith proper trigger strategyclean-orphan-files.enabledandclean-orphan-files.intervalRemove standalone scheduler
OrphanFilesCleaningExecutorfromInlineTableExecutorsAmoroServiceContainerAdd configuration options
clean-orphan-files.enabled(default: true)clean-orphan-files.interval(default: 1 day)process-factories.yamlplugin configEnhance state tracking
TableRuntimeCleanupStateto track last orphan files clean timeUpdate execution engine config
pool.orphan-files-cleaning.thread-counttoexecute-engines.yamlHow was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before making a pull request
Documentation