TheR1sing3un commented on code in PR #11963:
URL: https://github.com/apache/hudi/pull/11963#discussion_r1769461648
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -1655,7 +1656,11 @@ public int getInlineCompactDeltaSecondsMax() {
}
public CompactionStrategy getCompactionStrategy() {
- return
ReflectionUtils.loadClass(getString(HoodieCompactionConfig.COMPACTION_STRATEGY));
+ String compactionStrategiesStr =
getString(HoodieCompactionConfig.COMPACTION_STRATEGY);
+ String[] compactionStrategyArr = compactionStrategiesStr.split(",");
+ List<CompactionStrategy> compactionStrategies =
Arrays.stream(compactionStrategyArr)
+ .map(className -> (CompactionStrategy)
ReflectionUtils.loadClass(className)).collect(Collectors.toList());
+ return new CompositeCompactionStrategy(compactionStrategies);
Review Comment:
> We should use just the strategy class if it is not composed for most of
the cases.
Yes! I have updated it~
--
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]