你好,我有2个问题
1:每次重启服务,checkpoint的目录中chk- 总是从chk-1开始,chk-2 ........,没有从上次的编号开始 2:重启服务后,没有从checkpoint中恢复state的数据 下面是我的配置,我是在本地调试的,单机 final StreamExecutionEnvironment streamExecutionEnvironment = StreamExecutionEnvironment.createLocalEnvironmentWithWebUI(conf); // StateBackend stateBackend = new RocksDBStateBackend("hdfs://10.100.51.101:9000/flink/checkpoints",true); StateBackend stateBackend = new FsStateBackend("file:///flink/checkpoints"); // StateBackend stateBackend = new MemoryStateBackend(); streamExecutionEnvironment.setStateBackend(stateBackend); streamExecutionEnvironment.enableCheckpointing(1000); streamExecutionEnvironment.getCheckpointConfig().setCheckpointingMode(CheckpointingMode.EXACTLY_ONCE); streamExecutionEnvironment.getCheckpointConfig().setMinPauseBetweenCheckpoints(500); streamExecutionEnvironment.getCheckpointConfig().setCheckpointTimeout(60000); streamExecutionEnvironment.getCheckpointConfig().setMaxConcurrentCheckpoints(1); streamExecutionEnvironment.getCheckpointConfig() .enableExternalizedCheckpoints(CheckpointConfig.ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION); |
Hi
从 retain checkpoint 恢复可以参考文档[1] [1] https://ci.apache.org/projects/flink/flink-docs-release-1.11/zh/ops/state/checkpoints.html#%E4%BB%8E%E4%BF%9D%E7%95%99%E7%9A%84-checkpoint-%E4%B8%AD%E6%81%A2%E5%A4%8D%E7%8A%B6%E6%80%81 Best, Congxian sun <[hidden email]> 于2020年9月3日周四 下午4:14写道: > 你好,我有2个问题 > > 1:每次重启服务,checkpoint的目录中chk- 总是从chk-1开始,chk-2 ........,没有从上次的编号开始 > > 2:重启服务后,没有从checkpoint中恢复state的数据 > > 下面是我的配置,我是在本地调试的,单机 > > > > final StreamExecutionEnvironment streamExecutionEnvironment = > StreamExecutionEnvironment.createLocalEnvironmentWithWebUI(conf); > > // StateBackend stateBackend = new RocksDBStateBackend("hdfs:// > 10.100.51.101:9000/flink/checkpoints",true); > StateBackend stateBackend = new > FsStateBackend("file:///flink/checkpoints"); > // StateBackend stateBackend = new MemoryStateBackend(); > streamExecutionEnvironment.setStateBackend(stateBackend); > > streamExecutionEnvironment.enableCheckpointing(1000); > > streamExecutionEnvironment.getCheckpointConfig().setCheckpointingMode(CheckpointingMode.EXACTLY_ONCE); > > streamExecutionEnvironment.getCheckpointConfig().setMinPauseBetweenCheckpoints(500); > > streamExecutionEnvironment.getCheckpointConfig().setCheckpointTimeout(60000); > > streamExecutionEnvironment.getCheckpointConfig().setMaxConcurrentCheckpoints(1); > streamExecutionEnvironment.getCheckpointConfig() > > .enableExternalizedCheckpoints(CheckpointConfig.ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION); |
Free forum by Nabble | Edit this page |