[
https://issues.apache.org/jira/browse/FLINK-25081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17451634#comment-17451634
]
Guo Weijie commented on FLINK-25081:
------------------------------------
It seems that the numRecordsOut of streamTask only uses the value corresponding
to the end operator of operator chain. Do we also need calculate the non-end
operators of operator chain? And numBytesOut is counted when the
resultPartition is written out data, so the value is correct as your picture.
Maybe we can also use this approach for numRecordsOut, What's your opinion
about this?
> When chaining an operator of a side output stream, the num records sent
> displayed on the dashboard is incorrect
> ---------------------------------------------------------------------------------------------------------------
>
> Key: FLINK-25081
> URL: https://issues.apache.org/jira/browse/FLINK-25081
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Metrics
> Affects Versions: 1.14.0
> Reporter: Lijie Wang
> Priority: Major
> Attachments: image-2021-11-26-20-32-08-443.png
>
>
> As show in the following figure, "Map" is an operator of a side output
> stream, the num records sent of first vertex is 0.
> !image-2021-11-26-20-32-08-443.png|width=750,height=253!
>
> The job code is as follows:
> {code:java}
> final StreamExecutionEnvironment env =
> StreamExecutionEnvironment.getExecutionEnvironment();
> SingleOutputStreamOperator<Long> dataStream =
> env.addSource(new
> DataGeneratorSource<>(RandomGenerator.longGenerator(1, 1000)))
> .returns(Long.class)
> .setParallelism(10)
> .slotSharingGroup("group1");
> DataStream<Long> sideOutput = dataStream.getSideOutput(new
> OutputTag<Long>("10") {});
> sideOutput.map(num -> num).setParallelism(10).slotSharingGroup("group1");
> dataStream.addSink(new
> DiscardingSink<>()).setParallelism(10).slotSharingGroup("group2");
> env.execute("WordCount"); {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)