set state.checkpoint.dir to execution environment

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

set state.checkpoint.dir to execution environment

Jose Miguel Tejedor Fernandez
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

Reply | Threaded
Open this post in threaded view
|

Re: set state.checkpoint.dir to execution environment

Tony Wei
Hi Jose,

It seems that you enable the externalized checkpoints in your streaming job.
If enabling externalized checkpoints is what you really want to, 'state.checkpoints.dir' must be set in flink-conf.yaml.
For your second question, yes, the only way is to modify the flink-conf.yaml. See the reference https://ci.apache.org/projects/flink/flink-docs-release-1.3/setup/checkpoints.html#directory-structure.

Best,
Tony Wei

2017-09-03 7:09 GMT+08:00 Jose Miguel Tejedor Fernandez <[hidden email]>:
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