重新启动Flink作业而未指定保存点ID

时间:2019-10-17 22:15:40

标签: apache-flink

当我停止Flink作业时,Flink会生成一个保存点ID,例如以下示例中的savepoint-b89571-cfb5fdc03a16

$ flink stop b895716d023b2e14e57888d120eedccb

Suspending job "b895716d023b2e14e57888d120eedccb" with a savepoint.
Savepoint completed. Path: file:/tmp/flink-savepoints-directory/savepoint-b89571-cfb5fdc03a16

我需要记住ID,然后在以后使用它重新启动作业:

$ flink run -s /tmp/flink-savepoints-directory/savepoint-b89571-cfb5fdc03a16 ...

Starting execution of program
Job has been submitted with JobID 3abf1469779428cdfa918a0e115f83c3

我觉得这不方便且容易出错。有没有一种方法我只指定保存点文件夹而不关心保存点ID?使用文件夹重新启动作业时,它将自动检测要使用的保存点。也许默认情况下使用最后一个保存点,没关系。

0 个答案:

没有答案