- André Kelpe | @fs111 | andre[at]concurrentinc[dot]com
- works for concurrent inc (http://concurrentinc.com)
- company behind Cacading and Lingual
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) throws Exception { | |
final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); | |
DataStream<Tuple1<String>> stream = ... | |
DataStream<Tuple1<String>> filters = ... | |
stream | |
.keyBy(0) | |
.connect(filters.keyBy(0)) // partition both streams on same field and connect them | |
.flatMap(new StreamFilter()) // apply CoFlatMap function to update filters and to filter data |