flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From XuPingyong <...@git.apache.org>
Subject [GitHub] flink issue #2110: [FLINK-3974] Fix object reuse with multi-chaining
Date Wed, 01 Nov 2017 11:45:59 GMT
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?


---

Mime
View raw message