Clear state problem

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

Clear state problem

ゞ野蠻遊戲χ
Deal all:
           How do I clear state in ProcessAllWindowFunction at 0 o 'clock? Here is the code:



thanks
George Zhou
Reply | Threaded
Open this post in threaded view
|

Re: Clear state problem

r_khachatryan
Hi George Zhou,

You can clean up the state in your ProcessAllWindowFunction.process method.
If you want to avoid 10 seconds delay or you don't want to depend on the stream you can add a trigger that will additionally fire at the desired times.


Regards,
Roman


On Mon, Jul 13, 2020 at 5:41 PM ゞ野蠻遊戲χ <[hidden email]> wrote:
Deal all:
           How do I clear state in ProcessAllWindowFunction at 0 o 'clock? Here is the code:



thanks
George Zhou
Reply | Threaded
Open this post in threaded view
|

回复: Clear state problem

ゞ野蠻遊戲χ
Not only I want to clear the state, but I also want to clear the state in ProcessAllWindowFunction at exactly 0 o 'clock every day. KeyedProcessFunction has onTime that can be triggered, but ProcessAllWindowFunction doesn't. So I want to ask if there is a good way to clear state in ProcessAllWindowFunction as 0 o'clock every day?


------------------ 原始邮件 ------------------
发件人: "Khachatryan Roman" <[hidden email]>;
发送时间: 2020年7月14日(星期二) 凌晨2:17
收件人: "ゞ野蠻遊戲χ"<[hidden email]>;
抄送: "user"<[hidden email]>;
主题: Re: Clear state problem

Hi George Zhou,

You can clean up the state in your ProcessAllWindowFunction.process method.
If you want to avoid 10 seconds delay or you don't want to depend on the stream you can add a trigger that will additionally fire at the desired times.


Regards,
Roman


On Mon, Jul 13, 2020 at 5:41 PM ゞ野蠻遊戲χ <[hidden email]> wrote:
Deal all:
           How do I clear state in ProcessAllWindowFunction at 0 o 'clock? Here is the code:



thanks
George Zhou
Reply | Threaded
Open this post in threaded view
|

Re: 回复: Clear state problem

Yun Tang
Hi George

I think Roman has given you the thought that a customized trigger could help you, fire and purge the window at the specific time you want. Remember to also clear the trigger state at Trigger#clear if necessary.


Best
Yun Tang

From: �g野�U�[�颚� <[hidden email]>
Sent: Tuesday, July 14, 2020 10:04
To: Khachatryan Roman <[hidden email]>
Cc: user <[hidden email]>
Subject: 回复: Clear state problem
 
Not only I want to clear the state, but I also want to clear the state in ProcessAllWindowFunction at exactly 0 o 'clock every day. KeyedProcessFunction has onTime that can be triggered, but ProcessAllWindowFunction doesn't. So I want to ask if there is a good way to clear state in ProcessAllWindowFunction as 0 o'clock every day?


------------------ 原始邮件 ------------------
发件人: "Khachatryan Roman" <[hidden email]>;
发送时间: 2020年7月14日(星期二) 凌晨2:17
收件人: "�g野�U�[�颚�"<[hidden email]>;
抄送: "user"<[hidden email]>;
主题: Re: Clear state problem

Hi George Zhou,

You can clean up the state in your ProcessAllWindowFunction.process method.
If you want to avoid 10 seconds delay or you don't want to depend on the stream you can add a trigger that will additionally fire at the desired times.


Regards,
Roman


On Mon, Jul 13, 2020 at 5:41 PM �g野�U�[�颚� <[hidden email]> wrote:
Deal all:
           How do I clear state in ProcessAllWindowFunction at 0 o 'clock? Here is the code:



thanks
George Zhou