You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by ゞ野蠻遊戲χ <zh...@vip.qq.com> on 2020/07/13 15:40:52 UTC

Clear state problem

Deal all:
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;How do I clear state in ProcessAllWindowFunction at 0 o 'clock?&nbsp;Here is the code:





thanks
George Zhou

Re: 回复: Clear state problem

Posted by Yun Tang <my...@live.com>.
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�[��� <zh...@vip.qq.com>
Sent: Tuesday, July 14, 2020 10:04
To: Khachatryan Roman <kh...@gmail.com>
Cc: user <us...@flink.apache.org>
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" <kh...@gmail.com>;
����ʱ��: 2020��7��14��(���ڶ�) �賿2:17
�ռ���: "�gҰ�U�[���"<zh...@vip.qq.com>;
����: "user"<us...@flink.apache.org>;
����: 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.

See https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/windows.html#triggers

Regards,
Roman


On Mon, Jul 13, 2020 at 5:41 PM �gҰ�U�[��� <zh...@vip.qq.com>> wrote:
Deal all:
           How do I clear state in ProcessAllWindowFunction at 0 o 'clock? Here is the code:

[cid:A4D433C9@9BE76043.B6120D5F]

thanks
George Zhou

回复: Clear state problem

Posted by ゞ野蠻遊戲χ <zh...@vip.qq.com>.
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?




------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "Khachatryan Roman"                                                                                    <khachatryan.roman@gmail.com&gt;;
发送时间:&nbsp;2020年7月14日(星期二) 凌晨2:17
收件人:&nbsp;"ゞ野蠻遊戲χ"<zhoujiazhi1985@vip.qq.com&gt;;
抄送:&nbsp;"user"<user@flink.apache.org&gt;;
主题:&nbsp;Re: Clear state problem



Hi George Zhou,

You can clean up the state in your&nbsp;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.


See https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/windows.html#triggers


Regards,

Roman
 







On Mon, Jul 13, 2020 at 5:41 PM ゞ野蠻遊戲χ <zhoujiazhi1985@vip.qq.com&gt; wrote:

Deal all:
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;How do I clear state in ProcessAllWindowFunction at 0 o 'clock?&nbsp;Here is the code:





thanks
George Zhou

Re: Clear state problem

Posted by Khachatryan Roman <kh...@gmail.com>.
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.

See
https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/windows.html#triggers

Regards,
Roman


On Mon, Jul 13, 2020 at 5:41 PM ゞ野蠻遊戲χ <zh...@vip.qq.com> wrote:

> Deal all:
>            How do I clear state in ProcessAllWindowFunction at 0 o
> 'clock? Here is the code:
>
>
>
> thanks
> George Zhou
>