You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by qq <47...@qq.com> on 2019/11/06 09:17:51 UTC

Flink savepoint(checkpoint) recovery dev debug

Hi all.

   I want to simulation the shell command which “flink -s savepoint” , this command only can run with shell command, I want to debug it on dev, local development environment, anyone could help me ? Thanks very much. I only can use Savepoint.load to read the savepoint metadata and data. But I want to run the program like "flink -s” on dev phase(use code to run).


Re: Flink savepoint(checkpoint) recovery dev debug

Posted by Congxian Qiu <qc...@gmail.com>.
Hi

You can ref CheckpointMetadataLoadingTest#testLoadAndValidateSavepoint for
more information.
Even more, you can ref the line 136-line145 [1], and init a
CompletedCheckpointStorageLocation
to make it work.

[1]
https://github.com/apache/flink/blob/d788c6ff024fbe8a699e987d3df6a00160d22a06/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/Checkpoints.java#L136

Best,
Congxian


Yun Tang <my...@live.com> 于2019年11月6日周三 下午8:49写道:

> Hi
>
> The entrance of restoring savepoint is
> CheckpointCoordinator#restoreSavepoint [1], hope this could help you.
>
> [1]
> https://github.com/apache/flink/blob/9b43f13a50848382fbd634081b82509f464e62ca/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java#L1173
>
> Best
> Yun Tang
>
> On 11/6/19, 5:18 PM, "qq" <47...@qq.com> wrote:
>
>     Hi all.
>
>        I want to simulation the shell command which “flink -s savepoint” ,
> this command only can run with shell command, I want to debug it on dev,
> local development environment, anyone could help me ? Thanks very much. I
> only can use Savepoint.load to read the savepoint metadata and data. But I
> want to run the program like "flink -s” on dev phase(use code to run).
>
>
>
>

Re: Flink savepoint(checkpoint) recovery dev debug

Posted by Yun Tang <my...@live.com>.
Hi 

The entrance of restoring savepoint is CheckpointCoordinator#restoreSavepoint [1], hope this could help you.

[1] https://github.com/apache/flink/blob/9b43f13a50848382fbd634081b82509f464e62ca/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java#L1173

Best
Yun Tang

On 11/6/19, 5:18 PM, "qq" <47...@qq.com> wrote:

    Hi all.
    
       I want to simulation the shell command which “flink -s savepoint” , this command only can run with shell command, I want to debug it on dev, local development environment, anyone could help me ? Thanks very much. I only can use Savepoint.load to read the savepoint metadata and data. But I want to run the program like "flink -s” on dev phase(use code to run).