zhuzhurk commented on code in PR #25256:
URL: https://github.com/apache/flink/pull/25256#discussion_r1756519613
##########
flink-connectors/flink-connector-base/src/test/java/org/apache/flink/connector/base/source/reader/CoordinatedSourceITCase.java:
##########
@@ -74,7 +76,14 @@ public void testEnumeratorCreationFails() throws Exception {
OnceFailingToCreateEnumeratorSource.reset();
final StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironment();
-
env.setRestartStrategy(RestartStrategies.fixedDelayRestart(Integer.MAX_VALUE,
0L));
+ Configuration configuration = new Configuration();
+ configuration.set(RestartStrategyOptions.RESTART_STRATEGY,
"fixeddelay");
+ configuration.set(
+ RestartStrategyOptions.RESTART_STRATEGY_FIXED_DELAY_ATTEMPTS,
Integer.MAX_VALUE);
+ configuration.set(
+ RestartStrategyOptions.RESTART_STRATEGY_FIXED_DELAY_DELAY,
Duration.ofMillis(0));
+ env.configure(configuration,
Thread.currentThread().getContextClassLoader());
Review Comment:
Is it possible introduce some util methods to make it simpler? e.g.
setFixedDelayRestartStrategy(env, attempt, delay).
##########
flink-core/src/main/java/org/apache/flink/api/common/ArchivedExecutionConfig.java:
##########
@@ -44,11 +44,10 @@ public class ArchivedExecutionConfig implements
Serializable {
public ArchivedExecutionConfig(ExecutionConfig ec) {
executionMode = ec.getExecutionMode().name();
- if (ec.getRestartStrategy() != null) {
- restartStrategyDescription =
ec.getRestartStrategy().getDescription();
- } else {
- restartStrategyDescription = "default";
- }
+ // After remove restart strategy public API, we should set the restart
strategy description
+ // is always "Cluster level default restart strategy" for backward
compatibility
+ restartStrategyDescription = "Cluster level default restart strategy";
Review Comment:
Looks to me "Cluster level default restart strategy" is not correct if users
set restart strategy in Flink application through configuration.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]