[HUDI-1921] Add target io option for flink compaction (#2980)
This commit is contained in:
@@ -369,6 +369,12 @@ public class FlinkOptions {
|
||||
.defaultValue(100) // default 100 MB
|
||||
.withDescription("Max memory in MB for compaction spillable map, default 100MB");
|
||||
|
||||
public static final ConfigOption<Long> COMPACTION_TARGET_IO = ConfigOptions
|
||||
.key("compaction.target_io")
|
||||
.longType()
|
||||
.defaultValue(5120L) // default 5 GB
|
||||
.withDescription("Target IO per compaction (both read and write), default 5 GB");
|
||||
|
||||
public static final ConfigOption<Boolean> CLEAN_ASYNC_ENABLED = ConfigOptions
|
||||
.key("clean.async.enabled")
|
||||
.booleanType()
|
||||
|
||||
@@ -195,6 +195,7 @@ public class StreamerUtil {
|
||||
.withCompactionConfig(
|
||||
HoodieCompactionConfig.newBuilder()
|
||||
.withPayloadClass(conf.getString(FlinkOptions.PAYLOAD_CLASS))
|
||||
.withTargetIOPerCompactionInMB(conf.getLong(FlinkOptions.COMPACTION_TARGET_IO))
|
||||
.withInlineCompactionTriggerStrategy(
|
||||
CompactionTriggerStrategy.valueOf(conf.getString(FlinkOptions.COMPACTION_TRIGGER_STRATEGY).toUpperCase(Locale.ROOT)))
|
||||
.withMaxNumDeltaCommitsBeforeCompaction(conf.getInteger(FlinkOptions.COMPACTION_DELTA_COMMITS))
|
||||
|
||||
Reference in New Issue
Block a user