You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/06/04 09:29:35 UTC

[GitHub] [flink] zhuzhurk commented on a change in pull request #8573: [FLINK-12670][runtime] Implement FailureRateRestartBackoffTimeStrategy

zhuzhurk commented on a change in pull request #8573: [FLINK-12670][runtime] Implement FailureRateRestartBackoffTimeStrategy
URL: https://github.com/apache/flink/pull/8573#discussion_r290207209
 
 

 ##########
 File path: flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java
 ##########
 @@ -117,6 +117,30 @@
 	@PublicEvolving
 	public static final String EXECUTION_RETRY_DELAY_KEY = "execution-retries.delay";
 
+	/**
+	 * Maximum number of failures in given time interval {@link #RESTART_BACKOFF_TIME_STRATEGY_FAILURE_RATE_FAILURE_RATE_INTERVAL}
+	 * before failing a job in FailureRateRestartBackoffTimeStrategy.
+	 */
+	@PublicEvolving
+	public static final ConfigOption<Integer> RESTART_BACKOFF_TIME_STRATEGY_FAILURE_RATE_MAX_FAILURES_PER_INTERVAL =
+		key("restart-backoff-time-strategy.failure-rate.max-failures-per-interval").defaultValue(1);
+
+	/**
+	 * Time interval in which greater amount of failures than {@link #RESTART_BACKOFF_TIME_STRATEGY_FAILURE_RATE_MAX_FAILURES_PER_INTERVAL}
+	 * causes job fail in FailureRateRestartBackoffTimeStrategy. It can be specified using Scala's FiniteDuration notation: "1 min", "20 s"
+	 */
+	@PublicEvolving
+	public static final ConfigOption<String> RESTART_BACKOFF_TIME_STRATEGY_FAILURE_RATE_FAILURE_RATE_INTERVAL =
+		key("restart-backoff-time-strategy.failure-rate.failure-rate-interval").defaultValue("1 min");
+
+	/**
+	 * Backoff time between two consecutive restart attempts in FailureRateRestartBackoffTimeStrategy.
+	 * It can be specified using Scala's FiniteDuration notation: "1 min", "20 s".
+	 */
+	@PublicEvolving
+	public static final ConfigOption<String> RESTART_BACKOFF_TIME_STRATEGY_RESTART_BACKOFF_TIME =
 
 Review comment:
   Adding the config options to RestartBackoffTimeStrategy will be better to support adding more strategies, otherwise the RestartBackoffTimeStrategyOptions will hosts configurations for various strategies. While Each config option is meant to serve its dedicated strategy. 
   Ignoring the backward compatibility consideration, each config option should be recognized by its own strategy only.
   That's why I prefer the second option.
   
   As for now, I think both of them work, since the framework need to see config options of the fixed-delay and failure-rate strategies to do the compatibility work.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services