简体   繁体   English

如何配置 flink SQL 客户端提交启用检查点的作业?

[英]How to configure flink SQL client to submit job with checkpointing enabled?

What is an example of a flinksql-client config file with checkpointing enabled?启用检查点的 flinksql-client 配置文件的示例是什么?

When I submit streaming job through flink sql client, the checkpoint is not enabled.当我通过 flink sql 客户端提交流式作业时,检查点未启用。

The checkpointing configuration can not be set in flink sql client config file, but it can be set in the cluster configuration file (flink-conf.yaml). checkpointing配置不能在flink sql客户端配置文件中设置,但可以在集群配置文件(flink-conf.yaml)中设置。

At a minimum you should configure execution.checkpointing.interval , state.backend , and state.checkpoints.dir .您至少应该配置execution.checkpointing.intervalstate.backendstate.checkpoints.dir

Something like this, for example:像这样的东西,例如:

execution.checkpointing.interval: 10000
state.backend: filesystem
state.checkpoints.dir: file:///tmp/flink-checkpoints-directory
state.savepoints.dir: file:///tmp/flink-savepoints-directory

See the configuration docs for checkpointing , fault tolerance , and state backends for more details.有关更多详细信息,请参阅检查点容错state 后端的配置文档。

As far as I see in the docs you should be able to do it from the sql client by setting the properties like this:据我在文档中看到的,您应该能够通过设置如下属性从 sql 客户端执行此操作:

SET 'state.checkpoints.dir' = 'hdfs:///bar/foo/';
SET 'execution.checkpointing.mode' = 'EXACTLY_ONCE';
SET 'execution.checkpointing.interval' = '30min';
SET 'execution.checkpointing.min-pause' = '20min';
SET 'execution.checkpointing.max-concurrent-checkpoints' = '1';
SET 'execution.checkpointing.prefer-checkpoint-for-recovery' = 'true';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM