Questions with State Processor Api

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Questions with State Processor Api

Maminspapin
Hi, folk

Using State Processor Api can I:

1. get full state of flink-application with rocksdb backend in cluster mode
(as I realised it's checkpoins or savepoints)?
2. update it?
3. get this state from other flink-application (other jar)?
4. query it with sql (Table API & SQL) to get data I need?

Thanks



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Questions with State Processor Api

Maminspapin
This post was updated on .
Please, someone help me to understand is State Processor Api a solve or not
for a task.

I want to add to state 'Events' some target actions of user and remove them
if cancel action is received.

Every X period I need to check this state if it's time to make some
communication with user. If yes, so make it and update the state 'Events',
and also update the state 'Users'.

I assume the State Processor Api could help me to manage with stores.
So when X period is happen, I get savepoint which is full state of
application, load 'Events' and 'Users' states. Now I can query 'Events' with
sql (working with DataSet) and check time for communication with user. And make updates of states
if it needed.

Or this idea is not good and Flink is not suitable for the task?

Thanks,
Yuri L.



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Questions with State Processor Api

Roman Khachatryan
Hi Yuri,

I think you can achieve this by using "normal" flink operators and
sinks. One thing that immediately comes to my mind are timers [1].
It should be simpler to implement and setup rather than with the State
Processor API (though it seems doable via this API too).

[1]
https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/process_function.html#timers

Regards,
Roman

On Sun, Mar 14, 2021 at 12:22 PM Maminspapin <[hidden email]> wrote:

>
> Please, someone help me to understand is State Processor Api a solve or not
> for a task.
>
> I want to add to state 'Events' some target actions of user and remove them
> if cancel action is received.
>
> Every X period I need to check this state if it's time to make some
> communication with user. If yes, so make it and update the state 'Events',
> and also update the state 'Users'.
>
> I assume the State Processor Api could help me to manage with stores.
> So when X period is happen, I get savepoint which is full state of
> application, load 'Events' and 'Users' states. Now I can query 'Events' with
> sql and check time for communication with user. And make updates of states
> if it needed.
>
> Or this idea is not good and Flink is not suitable for the task?
>
> Thanks,
> Yuri L.
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/