Flink: does state access across stream?

2019-08-16 05:05发布

I have one stream is going to store the state, and I hope another stream can retrieve the state. Is this possible?

I have tried in my unit test that seems like doesn't work.

2条回答
Evening l夕情丶
2楼-- · 2019-08-16 06:00

Depending on how you need to use the state, it might be possible to leverage queryable state to share it with another stream.

查看更多
爷的心禁止访问
3楼-- · 2019-08-16 06:01

It is currently not possible that different streams share state. Even different operators which belong to the same stream are not able to share state.

The only thing you could play with is to use static fields to share state across different threads and thus also streams. But this only works if different tasks are executed by the same TaskManager and, thus, run in the same JVM.

查看更多
登录 后发表回答