http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/dynamically-partitioned-stream-tp15280p15293.html
Thanks for your reply Tony.
So there are actually 2 problems to solve:
1. All control stream msgs need to be broadcasted to all tasks.
2. The data stream messages with the same keys as those specified in the control message need to go to the same task as well, so that all the values required for the lambda (i.e. functions f1, f2 ...) are there.
In my understanding side inputs (which are actually not available in the current release) would address problem 1.
To address problem 1 I also tried dataStream.keyBy(key).connect(controlStream.broadcast).flatMap(new RichCoFlatMapFunction) but I get a runtime exception telling me I still need to do a keyBy before the flatMap. So are the upcoming side inputs the only way to broadcast a control stream to all tasks of a coFlatMap? Or is there another way?
As for problem 2, I am still pending a reply. Would appreciate if anyone has some suggestions.
Thanks,
M