Re: Using Queryable State within 1 job + docs suggestion

Posted by Tzu-Li (Gordon) Tai on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Using-Queryable-State-within-1-job-docs-suggestion-tp35227p35335.html

Hi,

That in general is not a good idea, with the problem you mentioned as well as the fact that the state you
query within the same job using queryable state does not provide any means of consistency guarantee.

When it comes to "querying state from another operator", it is a hint that your use case can potentially be
better modeled using the Stateful Functions framework [1]. With Stateful Functions, you would model this
as a request message to the target function, with the target function replying a response carrying its state.
There are still other shortcomings though, for example StateFun currently doesn't support windowed state yet.

Cheers,
Gordon

[1] https://flink.apache.org/stateful-functions.html

On Thu, May 21, 2020 at 10:25 PM Annemarie Burger <[hidden email]> wrote:
Hi,

So what I meant was that I have a keyed stream, and from each
thread/keygroup/PU I want to query the state of the other
threads/keygroups/PUs.

Does anybody have any experience with this?

I'm currently working on it, and the main problem seems to be that the
Queryable State Client requires the JobID from which to query the state,
which in my case would be the same as its own jobID. Any ideas how to
workaround this?
Using env.getStreamGraph.getJobGraph.getJobID doesn't seem to work.

Best,
Annemarie



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/