Hi Peng,

I think this is an intentional change of Public API made in FLINK-34455[1]. In 
Flink 1.19.x series, `RestoreMode` is defined in 
`org.apache.flink.runtime.jobgraph`, which was moved to 
`org.apache.flink.core.execution` package after Flink 1.20.

It’s suggested to declare dependencies that match the Flink version at runtime. 
If your job needs to target multiple versions, some reflection magic[2] might 
be necessary.

[1] https://issues.apache.org/jira/browse/FLINK-34455
[2] https://github.com/apache/flink-cdc/pull/3564

Best Regards,
Xiqian

2025年3月10日 13:34,Peng Peng <pengpeng8...@gmail.com> 写道:

Hi,

I have a flink job that can run on 1.20.0 but not 1.19.0. The error message is 
as below:

Caused by: java.lang.ClassNotFoundException: 
org.apache.flink.core.execution.RestoreMode.

So I compared the flink-core jar of both versions and it looks like the 1.19.0 
one does not have this RestoreMode class but the 1.20.0 has it. Anyone noticed 
this behavior as well and Is it a bug?

Thanks,
Peng

Reply via email to