Re: How to use keyBy on ConnectedStream?

2018-05-10 Thread Xingcan Cui
> same instance of CoFlatMap instance. So I've tried keyBy on ConnectedStream, > surprised to see that the return type is not grouped. > > ConnectedStreams connect = > myDataStream1.connect(myDataStreamOther); > connect = connect.keyBy("property1", "property2&q

How to use keyBy on ConnectedStream?

2018-05-10 Thread Ishwara Varnasi
Hello, I am using ConnectedStream to process two different types of messages using CoFlatMap. However, I would like to use keyBy on the ConnectedStream such that messages with same value of certain property should always be sent to same instance of CoFlatMap instance. So I've tried key

Re: .keyBy() on ConnectedStream

2017-01-28 Thread Matt
on statsStream to save the elements into Kafka and read from that > topic on predictionStream instead of initializing it with a reference of > statsStream. I would rather avoid writing unnecessarily into kafka. > > Is there any other way to achieve this? > > Thanks, > Matt

Re: .keyBy() on ConnectedStream

2017-01-28 Thread Matt
helps. > > Timo > > > Am 27/01/17 um 07:21 schrieb Matt: > > Hi all, >> >> What's the purpose of .keyBy() on ConnectedStream? How does it affect >> .map() and .flatMap()? >> >> I'm not finding a way to group stream elements based on

Re: .keyBy() on ConnectedStream

2017-01-27 Thread Timo Walther
Hi Matt, the keyBy() on ConnectedStream has two parameters to specify the key of the left and of the right stream. Same keys end up in the same CoMapFunction/CoFlatMapFunction. If you want to group both streams on a common key, then you can use .union() instead of .connect(). I hope that

.keyBy() on ConnectedStream

2017-01-26 Thread Matt
Hi all, What's the purpose of .keyBy() on ConnectedStream? How does it affect .map() and .flatMap()? I'm not finding a way to group stream elements based on a key, something like a Window on a normal Stream, but for a ConnectedStream. Regards, Matt