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