You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by op <52...@qq.com> on 2020/07/06 03:31:15 UTC

flink sql子查询状态清理不掉

大家好,我现在程序里面有像这样一段sql:&nbsp; select day,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;count(id),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sum(v1) from
(
select&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; day ,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id ,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sum(v1) v1 from source
&nbsp; &nbsp; &nbsp; group by day,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;id
)t


group by day


我设置了
tConfig.setIdleStateRetentionTime(Time.minutes(1440),Time.minutes(1450))


子查询里面的聚合是按照天和id聚合的,按道理1天之后就会自动清理,但是运行4天过程中,我在checkpoint的页面里面看到这个子查询的状态一直在增大,这是什么原因呢
我的版本是1.10.0

Re: flink sql子查询状态清理不掉

Posted by Benchao Li <li...@apache.org>.
感觉不太应该。你用的是哪个Flink版本,以及哪个planner呢?

op <52...@qq.com> 于2020年7月6日周一 上午11:31写道:

> 大家好,我现在程序里面有像这样一段sql:&nbsp; select day,
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;count(id),
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sum(v1) from
> (
> select&nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; day ,
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id ,
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sum(v1) v1 from source
> &nbsp; &nbsp; &nbsp; group by day,
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;id
> )t
>
>
> group by day
>
>
> 我设置了
> tConfig.setIdleStateRetentionTime(Time.minutes(1440),Time.minutes(1450))
>
>
>
> 子查询里面的聚合是按照天和id聚合的,按道理1天之后就会自动清理,但是运行4天过程中,我在checkpoint的页面里面看到这个子查询的状态一直在增大,这是什么原因呢
> 我的版本是1.10.0



-- 

Best,
Benchao Li