-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-34613][cdc] Support recover from a specific savepoint file #2959
Conversation
@PatrickRen PTAL. |
1ba122d
to
8f5ecac
Compare
@lvyanquan 您好,我使用您的PR打了包,结果报错,错误如下 Exception in thread "main" com.ververica.cdc.shaded.com.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --fromSavepoint 执行的命令 bash /opt/flink-cdc-3.0.0/bin/flink-cdc.sh /opt/flink-cdc-3.0.0/conf/mysql-to-starrocks.yaml --fromSavepoint file:/opt/flink-storage/savepoint/savepoint-f414a3-f2540c5684d0 请问是有什么需要注意的地方吗? |
@Jazzylol Have you updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lvyanquan for the contribution, I left some comments
.build(); | ||
|
||
public static final Option SAVEPOINT_RESTORE_MODE = | ||
Option.builder("rm") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm
is a dangerous abbreviation in CS which usually means remove
, please avoid use this abbreviation
|
||
public static final Option SAVEPOINT_RESTORE_MODE = | ||
Option.builder("rm") | ||
.longOpt("restoreMode") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.longOpt("restoreMode") | |
.longOpt("savepointRestoreMode") |
@@ -137,6 +156,16 @@ private String globalPipelineConfig() throws Exception { | |||
+ " CDC pipelines\n" | |||
+ " -h,--help Display help message\n" | |||
+ " --jar <arg> JARs to be submitted together with the pipeline\n" | |||
+ " -rm,--restoreMode <arg> Defines how should we restore from the given\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we consider other savepoint settings like allowNonRestoredState
?
Addressed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lvyanquan for the update, LGTM
Work like a charm. |
Rebased to master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lvyanquan Thanks for the pull request! I left a comment.
flink-cdc-cli/src/main/java/org/apache/flink/cdc/cli/CliFrontendOptions.java
Outdated
Show resolved
Hide resolved
…e using `-s` cli args.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lvyanquan Thanks for the update! LGTM.
@lvyanquan hi,请问您这个PR,所预期的从savepoint重启Flink CDC Pipeline作业的规范命令是这样吗?
因为我没有看到明确的重启命令说明*,所以对此怀有疑惑。并且我认为应当明确指出。 *您引用的链接中,我看到的仍是针对jar作业的重启方式。 |
经多次测试,我确认这个命令可行。 |
This closes #2940.
Use
fromSavepoint
to be consistent with Flink cli. Some codes are inspired from CliFrontendParser.