cshuo commented on code in PR #18319:
URL: https://github.com/apache/hudi/pull/18319#discussion_r2939887949
##########
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:
This isn't possible yet, given that the managed memory is declared per
operator/transformation, so it should be declared just after the operator
transformation being built.
--
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]