TheR1sing3un commented on code in PR #11963:
URL: https://github.com/apache/hudi/pull/11963#discussion_r1770721397
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieCompactionConfig.java:
##########
@@ -146,7 +146,7 @@ public class HoodieCompactionConfig extends HoodieConfig {
.markAdvanced()
.withDocumentation("Compaction strategy decides which file groups are
picked up for "
+ "compaction during each compaction run. By default. Hudi picks the
log file "
- + "with most accumulated unmerged data");
+ + "with most accumulated unmerged data. Support composite strategy
by providing, format: strategy_class_name1,strategy_class_name2,...");
Review Comment:
> The strategy can be composed with multiple strategies by concatenating the
class names with ','.
done~
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieCompactionConfig.java:
##########
@@ -408,8 +408,12 @@ public Builder approxRecordSize(int recordSizeEstimate) {
return this;
}
- public Builder withCompactionStrategy(CompactionStrategy
compactionStrategy) {
- compactionConfig.setValue(COMPACTION_STRATEGY,
compactionStrategy.getClass().getName());
+ public Builder withCompactionStrategy(CompactionStrategy...
compactionStrategies) {
+ StringBuilder compactionStrategyBuilder = new StringBuilder();
+ for (CompactionStrategy compactionStrategy : compactionStrategies) {
+
compactionStrategyBuilder.append(compactionStrategy.getClass().getName()).append(",");
Review Comment:
> Can we trim out the tailing `,`?
done~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]