[HUDI-1786] Add option for merge max memory (#2805)
This commit is contained in:
@@ -273,6 +273,12 @@ public class FlinkOptions {
|
||||
.defaultValue(128)
|
||||
.withDescription("Max log block size in MB for log file, default 128MB");
|
||||
|
||||
public static final ConfigOption<Integer> WRITE_MERGE_MAX_MEMORY = ConfigOptions
|
||||
.key("write.merge.max_memory")
|
||||
.intType()
|
||||
.defaultValue(100) // default 100 MB
|
||||
.withDescription("Max memory in MB for merge, default 100MB");
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Compaction Options
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@@ -207,7 +207,7 @@ public class StreamerUtil {
|
||||
.withMemoryConfig(
|
||||
HoodieMemoryConfig.newBuilder()
|
||||
.withMaxMemoryMaxSize(
|
||||
conf.getInteger(FlinkOptions.COMPACTION_MAX_MEMORY) * 1024 * 1024L,
|
||||
conf.getInteger(FlinkOptions.WRITE_MERGE_MAX_MEMORY) * 1024 * 1024L,
|
||||
conf.getInteger(FlinkOptions.COMPACTION_MAX_MEMORY) * 1024 * 1024L
|
||||
).build())
|
||||
.forTable(conf.getString(FlinkOptions.TABLE_NAME))
|
||||
|
||||
Reference in New Issue
Block a user