set state.checkpoint.dir to execution environment

Posted by Jose Miguel Tejedor Fernandez on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/set-state-checkpoint-dir-to-execution-environment-tp15349.html

Hi,

After enabling checkpoints and set the property env.setStateBackend(new FsStateBackend(url)) I am the following exception:

Caused by: java.lang.IllegalStateException: CheckpointConfig says to persist periodic checkpoints, but no checkpoint directory has been configured. You can configure configure one via key 'state.checkpoints.dir'.

I have not found any way to set the 'state.checkpoints.dir' to the execution environment. Is it possible? or the only way is to modify the file flink-conf.yaml instead? 
Thanks

BR