![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/19c77a8b3b203ad36cceaf9411a61059.jpeg)
1.概述
请问大家,Flink怎么让检查点失败,任务马上就停止呢?
Flink 1.14.4,我把检查点设置到了一个不存在的路径,检查点失败,但是任务没有停止。
请问怎么样能让检查点失败导致任务失败停止?
尝试过RestartStrategies.noRestart,以及setTolerableCheckpointFailureNum为0,但是都没有用
对应代码如下
最终解决 : -Drestart-strategy=none
设置了这个就可以了。把相关重启参数去掉
2.源码分析
检测点相关的设置都在 CheckpointConfig
中,设置检查点失败容忍值的时候,最小都是0.0代表一次失败就报错
/**
* Determines the threshold that we tolerance declined checkpoint failure number. The default
* value is -1 meaning undetermined and not set via