danny0405 commented on code in PR #18319:
URL: https://github.com/apache/hudi/pull/18319#discussion_r2937999803
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/utils/Pipelines.java:
##########
@@ -402,16 +414,19 @@ record -> new HoodieKey(record.getRecordKey(),
record.getPartitionPath()))
StreamWriteOperator.getFactory(conf, rowType))
.uid(writeOperatorUid)
.setParallelism(conf.get(FlinkOptions.WRITE_TASKS));
+ declareManagedMemoryIfNecessary(conf, writeDatastream, () ->
OptionsResolver.getWriteBufferSizeInBytes(conf));
if (isStreamingIndexWriteEnabled) {
// index writing pipeline
- return writeDatastream
+ SingleOutputStreamOperator<RowData> indexWriteDatastream =
writeDatastream
.partitionCustom(new RecordIndexPartitioner(conf),
IndexRowUtils::getHoodieKey)
.transform(
opName("index_write", conf),
TypeInformation.of(RowData.class),
new IndexWriteOperator(conf,
OperatorIDGenerator.fromUid(writeOperatorUid)))
.uid(opUID("index_write", conf))
.setParallelism(conf.get(FlinkOptions.INDEX_WRITE_TASKS));
+ declareManagedMemoryIfNecessary(conf, indexWriteDatastream, () ->
conf.get(FlinkOptions.INDEX_RLI_WRITE_BUFFER_SIZE) * 1024L * 1024L);
Review Comment:
is it possible we set up the managed memory in one shot after the pipeline
build finished instead of plug in the logic with multiples.
--
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]