Flink savepoint(checkpoint) recovery dev debug

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

Flink savepoint(checkpoint) recovery dev debug

qq
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).

Reply | Threaded
Open this post in threaded view
|

Re: Flink savepoint(checkpoint) recovery dev debug

Yun Tang
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" <[hidden email]> 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).
   
   

Reply | Threaded
Open this post in threaded view
|

Re: Flink savepoint(checkpoint) recovery dev debug

Congxian Qiu
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.


Best,
Congxian


Yun Tang <[hidden email]> 于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" <[hidden email]> 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).