无法从checkpoint中恢复state

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

无法从checkpoint中恢复state

sun
你好,我有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);
Reply | Threaded
Open this post in threaded view
|

Re: 无法从checkpoint中恢复state

gimlee
要指定到具体的ck地址才可以