1.12设置 env.setStateBackend(new RocksDBStateBackend(checkpointPath,
true))之后会报错
:
Caused by: java.lang.IllegalArgumentException: The fraction of memory to
allocate should not be 0. Please make sure that all types of managed memory
consumers contained in the job are configured with a non-negative weight via
`taskmanager.memory.managed.consumer-weights`.

但查看源码这个参数是默认值。
最终找到原因是
Streamconfig下getManagedMemoryFractionOperatorUseCaseOfSlot中
config缺少key : managedMemFraction.STATE_BACKEND
当设置
config.setDouble("managedMemFraction.STATE_BACKEND", 0.7)
后,程序正常。
代码如下
https://paste.ubuntu.com/p/9WrBz3Xrc6/




--
Sent from: http://apache-flink.147419.n8.nabble.com/

回复