Re: State Access Beyond RichCoFlatMapFunction

2021-02-22 Thread Kezhu Wang
Flink IT tests covers queryable state with mini cluster. All tests: https://github.com/apache/flink/tree/5c772f0a9cb5f8ac8e3f850a0278a75c5fa059d5/flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/itcases Setup/Configs:

Re: State Access Beyond RichCoFlatMapFunction

2021-02-19 Thread Sandeep khanzode
Hello, Is there an example setup of Queryable State for a Local Embedded Environment? I am trying to execute Flink programs from within IntelliJ. Any help would be appreciated! Even if not, if there are other examples where QueryableState can be executed in a standalone cluster, that would

Re: State Access Beyond RichCoFlatMapFunction

2021-02-12 Thread Sandeep khanzode
Oh okay. Got it. I will check. Thanks. > On 12-Feb-2021, at 3:14 PM, Kezhu Wang wrote: > > Hi Sandeep, > > I must mislead you by inaccurate words. I did not mean using > CoGroupedStreams, but only CoGroupedStreams.apply as reference for how to > union streams together and keyBy them. This

Re: State Access Beyond RichCoFlatMapFunction

2021-02-12 Thread Kezhu Wang
Hi Sandeep, I must mislead you by inaccurate words. I did not mean using CoGroupedStreams, but only CoGroupedStreams.apply as reference for how to union streams together and keyBy them. This way you can have all three streams’ states in downstream without duplication. Best, Kezhu Wang On

Re: State Access Beyond RichCoFlatMapFunction

2021-02-11 Thread Sandeep khanzode
Hello, Can you please share if you have some example of CoGroupedStreams? Thanks! > On 10-Feb-2021, at 3:22 PM, Kezhu Wang wrote: > > > Actually, my use case is that I want to share the state of one stream in > > two other streams. Right now, I can think of connecting this stream > >

Re: State Access Beyond RichCoFlatMapFunction

2021-02-10 Thread Kezhu Wang
> Actually, my use case is that I want to share the state of one stream in two other streams. Right now, I can think of connecting this stream independently with each of the two other streams and manage the state twice, effectively duplicating it. > Only the matching keys (with the two other

Re: State Access Beyond RichCoFlatMapFunction

2021-02-10 Thread Sandeep khanzode
Hi, Yes, but the stream, whose state I want to share, will be indefinite and have a large volume. Also, not all keys from that stream have to go to every Task Node. Only the matching keys (with the two other streams) will do. Please let me know if there is another cleaner way to achieve

Re: State Access Beyond RichCoFlatMapFunction

2021-02-09 Thread Kezhu Wang
Flink has broadcast state to broadcast one stream to other in case you are not aware of it. It actually duplicates state. 1. Broadcast state: https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/state/broadcast_state.html Best, Kezhu Wang On February 10, 2021 at 13:03:36, Sandeep

Re: State Access Beyond RichCoFlatMapFunction

2021-02-09 Thread Sandeep khanzode
Hello, Thanks a lot for the response. I will try to check Queryable-state for this purpose. Actually, my use case is that I want to share the state of one stream in two other streams. Right now, I can think of connecting this stream independently with each of the two other streams and manage

Re: State Access Beyond RichCoFlatMapFunction

2021-02-09 Thread Kezhu Wang
(a) It is by design. For keyed state, you can only access state for that key, not others. If you want one value per key, ValueState fits more appropriate that MapState. (b) state-processor-api aims to access/create/modify/upgrade offline savepoint but not running state. Queryable state may meet

State Access Beyond RichCoFlatMapFunction

2021-02-09 Thread Sandeep khanzode
Hello, I am creating a class that extends RichCoFlatMapFunction. I need to connect() two streams to basically share the state of one stream in another. This is what I do: private transient MapState state; @Override public void open(Configuration parameters) throws Exception {