Re: How to access state from another map functions
Posted by
Biao Liu on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/How-to-access-state-from-another-map-functions-tp29073p29075.html
Hi Yuta,
No, you can't get the same state from different functions. That's not the semantics of state. And these two functions might run in different threads/processes even on different machines.
On Mon, Jul 29, 2019 at 11:12 AM Yuta Morisawa <
[hidden email]> wrote:
Hi all
I want to use the same state for multiple times.
stream
.keyBy(0)
.map(new MyRichMapfunction)
...
.keyBy(0)
.map(new MyRichMapfunction2)
In this snippet, I want access the same state in MyRichMapfunction and
MyRichMapfunction2, but I failed in spite of keying the same key.
Is there any way to access the state from other class, or is there a
kind of global state.
--
Thank you.
Yuta