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/05/30 11:17:10 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_r288935084
 
 

 ##########
 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:
   I think we can organize the options better. 2 options in my mind:
   1. put them in a standalone options class, i.e. RestartBackoffTimeStrategyOptions
   2. put the options into its related RestartBackoffTimeStrategy, e.g. fixed delay options in  FailureRateRestartBackoffTimeStrategy and failure rate options in FailureRateRestartBackoffTimeStrategy.
   
   I prefer the latter way. What do you think?

----------------------------------------------------------------
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