MapWithState for two keyed stream
Posted by
Peter Zende on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/MapWithState-for-two-keyed-stream-tp20060.html
Hi all,
Is it possible to define two DataStream sources - one which reads from Kafka, the other reads from HDFS - and apply mapWithState with CoFlatMapFunction? The idea would be to read historical data from HDFS along with the live stream from Kafka and based on some business write the output to the sink in correct update order?
Or is it easier to just union those two streams? In mapWithState we should tell from which stream the record originates from to be able to correctly build up the state store.
Many thanks.
Peter