Hi:
Referring to documentation 
(https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/stream/operators/index.html)
 for ConnectedStreams:
"Connects" two data streams retaining their types. Connect allowing for shared 
state between the two streams.DataStream<Integer> someStream = //...
DataStream<String> otherStream = //...

ConnectedStreams<Integer, String> connectedStreams = 
someStream.connect(otherStream);
If the two connected streams have different number of partitions, eg 
(someStream has 4 and otherStream has 2), then how do the elements of the 
stream get distributed for the CoMapFunction:
connectedStreams.map(new CoMapFunction<Integer, String, Boolean>() {
    @Override
    public Boolean map1(Integer value) {
        return true;
    }

    @Override
    public Boolean map2(String value) {
        return false;
    }
});
I believe that that if the second stream is broadcast, then each partition of 
the first will get all the elements of the second.  Is my understanding correct 
?
If the streams are not broadcast and since the first stream has 4 partitions 
and second one had 2, then how are the elements of the second stream 
distributed to each partition of the first ?
Also, if the streams are not broadcasted but have same number of partitions, 
how are the elements distributed ?
Thanks
Mans



Reply via email to