Flink: does state access across stream?

牧云@^-^@ 提交于 2020-01-06 06:03:00

问题


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.


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/50806621/flink-does-state-access-across-stream

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!