You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by XuPingyong <gi...@git.apache.org> on 2017/11/01 11:45:59 UTC
[GitHub] flink issue #2110: [FLINK-3974] Fix object reuse with multi-chaining
Github user XuPingyong commented on the issue:
https://github.com/apache/flink/pull/2110
I do not agree with this pr as it always copy StreamRecord to downstream operator.
StreamMap change the input StreamRecord, so this pr works well. But many operators do not change/reuse the input StreamRecord, like StreamFlatMap.
The following code no not need the extra copy.
`DataStream<A> input = ...
input
.flatmap(FlatMapFunction<A,B>...)
.addSink(...);
input
.flatmap(FlatMapFunction<A,C>...)
.addSink(...);`
So I think we can change StreamMap to not reuse the input StreamRecord. And directly send the StreamRecord if objectReuse is set true.
What do you think?
---