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 guanyq <dl...@163.com> on 2020/04/10 23:20:54 UTC

关于flink state的问题

您好:

1.随着程序的运行,task内存中的状态会不断增加,迟早会出现内存溢出问题,想知道一般都如何解决这个问题?

 

Re: 关于flink state的问题

Posted by Congxian Qiu <qc...@gmail.com>.
你好:

1 state 如果不需要了,可以自己删除(如果是 Window 中使用的,可以进行配置在 Window 结束时删除)
2 可以使用 TTL State[1]
3 如果仅考虑 OOM 风险,可以考虑使用 RocksDBStateBackend

[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/stream/state/state.html#state-time-to-live-ttl
Best,
Congxian


guanyq <dl...@163.com> 于2020年4月11日周六 上午7:21写道:

> 您好:
>
> 1.随着程序的运行,task内存中的状态会不断增加,迟早会出现内存溢出问题,想知道一般都如何解决这个问题?
>
>