This is an automated email from the ASF dual-hosted git repository.
yihua pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 9e7a42a128e [HUDI-7616] Avoid multiple cleaner plans and deprecate
hoodie.clean.allow.multiple (#11013)
9e7a42a128e is described below
commit 9e7a42a128e6730e0ec768c22210c50944c71205
Author: Y Ethan Guo <[email protected]>
AuthorDate: Sat Apr 13 19:04:44 2024 -0700
[HUDI-7616] Avoid multiple cleaner plans and deprecate
hoodie.clean.allow.multiple (#11013)
---
.../src/main/java/org/apache/hudi/config/HoodieCleanConfig.java | 4 +++-
.../src/test/java/org/apache/hudi/table/TestCleaner.java | 6 +++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git
a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieCleanConfig.java
b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieCleanConfig.java
index f2851370acf..9d42afb335f 100644
---
a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieCleanConfig.java
+++
b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieCleanConfig.java
@@ -167,11 +167,13 @@ public class HoodieCleanConfig extends HoodieConfig {
+ "execution is slow due to limited parallelism, you can increase
this to tune the "
+ "performance..");
+ @Deprecated
public static final ConfigProperty<Boolean> ALLOW_MULTIPLE_CLEANS =
ConfigProperty
.key("hoodie.clean.allow.multiple")
- .defaultValue(true)
+ .defaultValue(false)
.markAdvanced()
.sinceVersion("0.11.0")
+ .deprecatedAfter("1.0.0")
.withDocumentation("Allows scheduling/executing multiple cleans by
enabling this config. If users prefer to strictly ensure clean requests should
be mutually exclusive, "
+ ".i.e. a 2nd clean will not be scheduled if another clean is not
yet completed to avoid repeat cleaning of same files, they might want to
disable this config.");
diff --git
a/hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/TestCleaner.java
b/hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/TestCleaner.java
index 001ea19d168..8c8528c2b7a 100644
---
a/hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/TestCleaner.java
+++
b/hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/TestCleaner.java
@@ -593,13 +593,13 @@ public class TestCleaner extends HoodieCleanerTestBase {
timeline = metaClient.reloadActiveTimeline();
assertEquals(0, cleanStats.size(), "Must not clean any files");
- assertEquals(1, timeline.getTimelineOfActions(
+ assertEquals(0, timeline.getTimelineOfActions(
CollectionUtils.createSet(HoodieTimeline.CLEAN_ACTION)).filterInflightsAndRequested().countInstants());
assertEquals(0, timeline.getTimelineOfActions(
CollectionUtils.createSet(HoodieTimeline.CLEAN_ACTION)).filterInflights().countInstants());
- assertEquals(--cleanCount, timeline.getTimelineOfActions(
+ assertEquals(cleanCount, timeline.getTimelineOfActions(
CollectionUtils.createSet(HoodieTimeline.CLEAN_ACTION)).filterCompletedInstants().countInstants());
- assertTrue(timeline.getTimelineOfActions(
+ assertFalse(timeline.getTimelineOfActions(
CollectionUtils.createSet(HoodieTimeline.CLEAN_ACTION)).filterInflightsAndRequested().containsInstant(makeNewCommitTime(--instantClean,
"%09d")));
}
}