恢复savepoint,除了命令行,能通过代码获取吗?

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

恢复savepoint,除了命令行,能通过代码获取吗?

liu zhongfeng
如题,restore savepoint,除了run flink -s savepointpath之外,能通过代码恢复吗,因为公司集群没法输入命令行。如果可以的话,能给个小demo,或者API也可以
谢谢。

Best,
Rio Liu, 刘中锋

Reply | Threaded
Open this post in threaded view
|

答复: 恢复savepoint,除了命令行,能通过代码获取吗?

戴嘉诚
你好,
        可以通过flink的restFul去调用保存savepoint

发件人: liu zhongfeng
发送时间: 2019年8月9日 20:28
收件人: [hidden email]
主题: 恢复savepoint,除了命令行,能通过代码获取吗?

如题,restore savepoint,除了run flink -s savepointpath之外,能通过代码恢复吗,因为公司集群没法输入命令行。如果可以的话,能给个小demo,或者API也可以
谢谢。

Best,
Rio Liu, 刘中锋


Reply | Threaded
Open this post in threaded view
|

Re: 恢复savepoint,除了命令行,能通过代码获取吗?

Yun Tang
Hi 中锋

恐怕不能通过代码来回复savepoint,目前一共只有有两个地方可以传入savepoint path,分别是


  1.  CliFrontendParser#createSavepointRestoreSettings  [1]
  2.  JarRunHandler#getSavepointRestoreSettings             [2]

分别对应命令行,网页(REST)提交,没办法在代码里面进行恢复请求,其实我理解REST或者网页提交应该也满足你们的需求。

[1] https://github.com/apache/flink/blob/f400fbbe138696e82897941ee012f64c23f7dfcd/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontendParser.java#L434
[2] https://github.com/apache/flink/blob/f400fbbe138696e82897941ee012f64c23f7dfcd/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JarRunHandler.java#L111


祝好
唐云
________________________________
From: 戴嘉诚 <[hidden email]>
Sent: Friday, August 9, 2019 20:54
To: [hidden email] <[hidden email]>
Subject: 答复: 恢复savepoint,除了命令行,能通过代码获取吗?

你好,
        可以通过flink的restFul去调用保存savepoint

发件人: liu zhongfeng
发送时间: 2019年8月9日 20:28
收件人: [hidden email]
主题: 恢复savepoint,除了命令行,能通过代码获取吗?

如题,restore savepoint,除了run flink -s savepointpath之外,能通过代码恢复吗,因为公司集群没法输入命令行。如果可以的话,能给个小demo,或者API也可以
谢谢。

Best,
Rio Liu, 刘中锋