请教个Flink savepoint的问题

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

请教个Flink savepoint的问题

占英华
Flink APi 中我们在java代码中使用客户端调用类ClusterClient如下的方法停止了任务:
CompletableFuture<String> stopWithSavepoint(JobID var1, boolean var2, @Nullable String var3);然后我们保存了该任务的savepoint信息,那恢复时没看到对应的恢复方法,找了些资料都是通过命令来恢复,有没有直接调用Java API 层次的方法来恢复任务?



[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: 请教个Flink savepoint的问题

Yun Tang
Hi,

没有暴露现成的API,但是可以参照测试用例的写法,给jobGraph设置 savepointRestoreSettings [1]。

[1] https://github.com/apache/flink/blob/ab87cf4ec0260c30194f3d8e75be1f43318aa32a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/ResumeCheckpointManuallyITCase.java#L383

祝好
唐云
________________________________
From: [hidden email] <[hidden email]>
Sent: Monday, January 11, 2021 19:07
To: user-zh <[hidden email]>
Subject: 请教个Flink savepoint的问题

Flink APi 中我们在java代码中使用客户端调用类ClusterClient如下的方法停止了任务:
CompletableFuture<String> stopWithSavepoint(JobID var1, boolean var2, @Nullable String var3);然后我们保存了该任务的savepoint信息,那恢复时没看到对应的恢复方法,找了些资料都是通过命令来恢复,有没有直接调用Java API 层次的方法来恢复任务?



[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: 请教个Flink savepoint的问题

占英华
好的,感谢您的帮助!

> 在 2021年1月11日,20:23,Yun Tang <[hidden email]> 写道:
>
> Hi,
>
> 没有暴露现成的API,但是可以参照测试用例的写法,给jobGraph设置 savepointRestoreSettings [1]。
>
> [1] https://github.com/apache/flink/blob/ab87cf4ec0260c30194f3d8e75be1f43318aa32a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/ResumeCheckpointManuallyITCase.java#L383
>
> 祝好
> 唐云
> ________________________________
> From: [hidden email] <[hidden email]>
> Sent: Monday, January 11, 2021 19:07
> To: user-zh <[hidden email]>
> Subject: 请教个Flink savepoint的问题
>
> Flink APi 中我们在java代码中使用客户端调用类ClusterClient如下的方法停止了任务:
> CompletableFuture<String> stopWithSavepoint(JobID var1, boolean var2, @Nullable String var3);然后我们保存了该任务的savepoint信息,那恢复时没看到对应的恢复方法,找了些资料都是通过命令来恢复,有没有直接调用Java API 层次的方法来恢复任务?
>
>
>
> [hidden email]