首次快照时间是一个随机数,计算逻辑如下。你可以尝试设置下execution.checkpointing.min-pause

private long getRandomInitDelay() {
    return ThreadLocalRandom.current().nextLong(minPauseBetweenCheckpoints,
baseInterval + 1L);
}


aiden <18765295...@163.com> 于2023年1月5日周四 14:06写道:

> hello,我们需求是要将kafka数据落到hive中,为了避免hive小文件问题,采用了一小时checkpoint,具体参数为:
>
> bsEnv.enableCheckpointing(3600000);
> bsEnv.setStateBackend(new HashMapStateBackend());
>
> bsEnv.getCheckpointConfig().setCheckpointStorage("hdfs://xxx/user/flink/checkpoint/serverlog/hc");
>
> 但在执行时发现首次checkpoint并没有按照一小时触发.
> 作业执行时间为:2023-01-05 10:04:17,但首次checkpoint时间为:2023-01-05 10:34:19
> checkpoint首次触发时间是和什么有关?以及通过什么参数可以设置吗?
>

回复