You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by zh...@apache.org on 2020/05/19 02:48:13 UTC
[flink] branch master updated: [FLINK-15813][runtime] Set default value of config “jobmanager.execution.failover-strategy” to “region”
This is an automated email from the ASF dual-hosted git repository.
zhuzh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new b425c05 [FLINK-15813][runtime] Set default value of config “jobmanager.execution.failover-strategy” to “region”
b425c05 is described below
commit b425c05d57ace5cf27591dbd6798b6131211f6c1
Author: Zhu Zhu <re...@gmail.com>
AuthorDate: Mon May 18 18:30:23 2020 +0800
[FLINK-15813][runtime] Set default value of config “jobmanager.execution.failover-strategy” to “region”
---
docs/_includes/generated/all_jobmanager_section.html | 2 +-
docs/_includes/generated/expert_fault_tolerance_section.html | 2 +-
docs/_includes/generated/job_manager_configuration.html | 2 +-
.../java/org/apache/flink/configuration/JobManagerOptions.java | 4 ++--
.../runtime/executiongraph/failover/FailoverStrategyLoader.java | 4 +++-
.../failover/flip1/FailoverStrategyFactoryLoader.java | 8 +-------
6 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/docs/_includes/generated/all_jobmanager_section.html b/docs/_includes/generated/all_jobmanager_section.html
index 6ef552c..e280984 100644
--- a/docs/_includes/generated/all_jobmanager_section.html
+++ b/docs/_includes/generated/all_jobmanager_section.html
@@ -22,7 +22,7 @@
</tr>
<tr>
<td><h5>jobmanager.execution.failover-strategy</h5></td>
- <td style="word-wrap: break-word;">region</td>
+ <td style="word-wrap: break-word;">"region"</td>
<td>String</td>
<td>This option specifies how the job computation recovers from task failures. Accepted values are:<ul><li>'full': Restarts all tasks to recover the job.</li><li>'region': Restarts all tasks that could be affected by the task failure. More details can be found <a href="../dev/task_failure_recovery.html#restart-pipelined-region-failover-strategy">here</a>.</li></ul></td>
</tr>
diff --git a/docs/_includes/generated/expert_fault_tolerance_section.html b/docs/_includes/generated/expert_fault_tolerance_section.html
index fb377b8..8e3d6fc 100644
--- a/docs/_includes/generated/expert_fault_tolerance_section.html
+++ b/docs/_includes/generated/expert_fault_tolerance_section.html
@@ -58,7 +58,7 @@
</tr>
<tr>
<td><h5>jobmanager.execution.failover-strategy</h5></td>
- <td style="word-wrap: break-word;">region</td>
+ <td style="word-wrap: break-word;">"region"</td>
<td>String</td>
<td>This option specifies how the job computation recovers from task failures. Accepted values are:<ul><li>'full': Restarts all tasks to recover the job.</li><li>'region': Restarts all tasks that could be affected by the task failure. More details can be found <a href="../dev/task_failure_recovery.html#restart-pipelined-region-failover-strategy">here</a>.</li></ul></td>
</tr>
diff --git a/docs/_includes/generated/job_manager_configuration.html b/docs/_includes/generated/job_manager_configuration.html
index 52cfa13..87341aa 100644
--- a/docs/_includes/generated/job_manager_configuration.html
+++ b/docs/_includes/generated/job_manager_configuration.html
@@ -28,7 +28,7 @@
</tr>
<tr>
<td><h5>jobmanager.execution.failover-strategy</h5></td>
- <td style="word-wrap: break-word;">region</td>
+ <td style="word-wrap: break-word;">"region"</td>
<td>String</td>
<td>This option specifies how the job computation recovers from task failures. Accepted values are:<ul><li>'full': Restarts all tasks to recover the job.</li><li>'region': Restarts all tasks that could be affected by the task failure. More details can be found <a href="../dev/task_failure_recovery.html#restart-pipelined-region-failover-strategy">here</a>.</li></ul></td>
</tr>
diff --git a/flink-core/src/main/java/org/apache/flink/configuration/JobManagerOptions.java b/flink-core/src/main/java/org/apache/flink/configuration/JobManagerOptions.java
index 173cdd2..dad1497 100644
--- a/flink-core/src/main/java/org/apache/flink/configuration/JobManagerOptions.java
+++ b/flink-core/src/main/java/org/apache/flink/configuration/JobManagerOptions.java
@@ -234,10 +234,10 @@ public class JobManagerOptions {
* This option specifies the failover strategy, i.e. how the job computation recovers from task failures.
*/
@Documentation.Section({Documentation.Sections.ALL_JOB_MANAGER, Documentation.Sections.EXPERT_FAULT_TOLERANCE})
- @Documentation.OverrideDefault("region")
public static final ConfigOption<String> EXECUTION_FAILOVER_STRATEGY =
key("jobmanager.execution.failover-strategy")
- .defaultValue("full")
+ .stringType()
+ .defaultValue("region")
.withDescription(Description.builder()
.text("This option specifies how the job computation recovers from task failures. " +
"Accepted values are:")
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/FailoverStrategyLoader.java b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/FailoverStrategyLoader.java
index 6553c8a..241caba 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/FailoverStrategyLoader.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/FailoverStrategyLoader.java
@@ -41,7 +41,9 @@ public class FailoverStrategyLoader {
* Loads a FailoverStrategy Factory from the given configuration.
*/
public static FailoverStrategy.Factory loadFailoverStrategy(Configuration config, @Nullable Logger logger) {
- final String strategyParam = config.getString(JobManagerOptions.EXECUTION_FAILOVER_STRATEGY);
+ final String strategyParam = config.getString(
+ JobManagerOptions.EXECUTION_FAILOVER_STRATEGY,
+ FULL_RESTART_STRATEGY_NAME);
if (StringUtils.isNullOrWhitespaceOnly(strategyParam)) {
if (logger != null) {
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/FailoverStrategyFactoryLoader.java b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/FailoverStrategyFactoryLoader.java
index 95dc7f6..68d614b 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/FailoverStrategyFactoryLoader.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/FailoverStrategyFactoryLoader.java
@@ -47,13 +47,7 @@ public final class FailoverStrategyFactoryLoader {
public static FailoverStrategy.Factory loadFailoverStrategyFactory(final Configuration config) {
checkNotNull(config);
- // the default NG failover strategy is the region failover strategy.
- // TODO: Remove the overridden default value when removing legacy scheduler
- // and change the default value of JobManagerOptions.EXECUTION_FAILOVER_STRATEGY
- // to be "region"
- final String strategyParam = config.getString(
- JobManagerOptions.EXECUTION_FAILOVER_STRATEGY,
- PIPELINED_REGION_RESTART_STRATEGY_NAME);
+ final String strategyParam = config.getString(JobManagerOptions.EXECUTION_FAILOVER_STRATEGY);
switch (strategyParam.toLowerCase()) {
case FULL_RESTART_STRATEGY_NAME: