Re: Please help, I need to bootstrap keyed state into a stream

2020-08-12 Thread Marco Villalobos
Hi Seth, Thank you for the advice. The solution you mentioned is exactly what I did. I wrote a small tutorial that explains how to repeat that pattern. You can read about my solution at https://github.com/minmay/flink-patterns/tree/master/bootstrap-keyed-state-into-stream

Re: Please help, I need to bootstrap keyed state into a stream

2020-08-12 Thread Seth Wiesman
Just to summarize the conversation so far: The state processor api reads data from a 3rd party system - such as JDBC in this example - and generates a savepoint file that is written out to some DFS. This savepoint can then be used to when starting a flink streaming application. It is a two-step

Re: Please help, I need to bootstrap keyed state into a stream

2020-08-10 Thread Marco Villalobos
I think there is a bug in Flink when running locally without a cluster. My code worked in a cluster, but failed when run locally. My code does not save null values in Map State. > On Aug 9, 2020, at 11:27 PM, Tzu-Li Tai wrote: > > Hi, > > For the NullPointerException, what seems to be

Re: Please help, I need to bootstrap keyed state into a stream

2020-08-10 Thread Marco Villalobos
Thank you. Your instruction was helpful in my solving this. You can read about my solution at https://github.com/minmay/flink-patterns/tree/master/bootstrap-keyed-state-into-stream > On Aug 10, 2020, at

Re: Please help, I need to bootstrap keyed state into a stream

2020-08-10 Thread Marco Villalobos
First, thank you. I want to believe you, I don't see how that is possible. All of the code is self-contained, and at the bottom of all the code, I print out the non-null values before I attempt to put in the map state. All of the debug output before and after indicates that there is a null

Re: Please help, I need to bootstrap keyed state into a stream

2020-08-10 Thread orionemail
I recently was in the same situation as Marco, the docs do explain what you need to do, but without experience with Flink it might still not be obvious what you need to do. What I did initially: Setup the job to run in a 'write a save state' mode by implementing a command line switch I could

Re: Please help, I need to bootstrap keyed state into a stream

2020-08-10 Thread Tzu-Li Tai
Hi, For the NullPointerException, what seems to be happening is that you are setting NULL values in your MapState, that is not allowed by the API. Otherwise, the code that you showed for bootstrapping state seems to be fine. > I have yet to find a working example that shows how to do both >

Please help, I need to bootstrap keyed state into a stream

2020-08-08 Thread Marco Villalobos
According to the documentation, and various blogs, it is possible to use the Batch Execution Environment to bootstrap state into a save point, and then load that state in a Stream Execution Environment. I am trying to use that feature. State Processor API documentation states that "you can