zhuzhurk commented on a change in pull request #9113: [FLINK-13222] [runtime]
Add documentation for failover strategy option
URL: https://github.com/apache/flink/pull/9113#discussion_r306112407
##########
File path: docs/dev/task_failure_recovery.zh.md
##########
@@ -260,4 +265,50 @@ env.setRestartStrategy(RestartStrategies.noRestart())
这对于启用了 checkpoint 的流处理程序很有帮助。
如果没有定义其他重启策略,默认选择固定延时重启策略。
+## 故障恢复策略
+
+Flink 支持多种不同的故障恢复策略,该策略需要通过 Flink 配置文件 `flink-conf.yaml` 中的
*jobmanager.execution.failover-strategy*
+配置项进行配置。
+
+<table class="table table-bordered">
+ <thead>
+ <tr>
+ <th class="text-left" style="width: 50%">故障恢复策略</th>
+ <th class="text-left">jobmanager.execution.failover-strategy 配置值</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>全图重启</td>
+ <td>full</td>
+ </tr>
+ <tr>
+ <td>基于 Region 的局部重启</td>
+ <td>region</td>
+ </tr>
+ </tbody>
+</table>
+
+### 全图重启故障恢复策略
+
+在全图重启故障恢复策略下,Task 发生故障时会重启作业中的所有 Task 进行故障恢复。
+
+### 基于 Region 的局部重启故障恢复策略
+
+该策略会将作业中的所有 Task 划分为数个 Region。当有 Task 发生故障时,它会尝试找出进行故障恢复需要重启的最小 Region 集合。
+相比于全局重启故障恢复策略,这种策略在一些场景下的故障恢复需要重启的 Task 会更少。
+
+此处 Region 指以 Pipelined 形式进行数据交换的 Task 集合。也就是说,Batch 形式的数据交换会构成 Region 的边界。
+- DataStream 和 流式 Table/SQL 作业的所有数据交换都是 Pipelined 形式的。
+- 批处理式 Table/SQL 作业的所有数据交换默认都是 Batch 形式的。
+- DataSet 作业中的数据交换形式会根据 [ExecutionConfig]({{ site.baseurl
}}/zh/dev/execution_configuration.html)
+ 中配置的 [ExecutionMode]({{ site.javadocs_baseurl
}}/api/java/org/apache/flink/api/common/ExecutionMode.html)
+ 决定。
+
+需要重启的 Region 的判断逻辑如下:
+1. 出错 Task 所在 Region 需要重启。
+2. 如果要重启的 Region 需要消费的结果数据 Partition 无法访问(丢失或损坏),产出该数据 Partition 的 Region
也需要重启。
Review comment:
Agreed that we can refine this description.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services