You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by uc...@apache.org on 2017/01/09 13:38:20 UTC
[2/2] flink git commit: [docs] Add TOC to restart strategies page
[docs] Add TOC to restart strategies page
This closes #3059.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/8c21fa74
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/8c21fa74
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/8c21fa74
Branch: refs/heads/release-1.2
Commit: 8c21fa748de0959c4c1e08078fac3b64115dd5bb
Parents: 2aaa093
Author: Ufuk Celebi <uc...@apache.org>
Authored: Mon Jan 9 14:35:24 2017 +0100
Committer: Ufuk Celebi <uc...@apache.org>
Committed: Mon Jan 9 14:36:37 2017 +0100
----------------------------------------------------------------------
docs/dev/restart_strategies.md | 18 ++++++++++++++----
docs/setup/config.md | 8 ++++----
2 files changed, 18 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/8c21fa74/docs/dev/restart_strategies.md
----------------------------------------------------------------------
diff --git a/docs/dev/restart_strategies.md b/docs/dev/restart_strategies.md
index cc1a68e..a4901ab 100644
--- a/docs/dev/restart_strategies.md
+++ b/docs/dev/restart_strategies.md
@@ -26,6 +26,11 @@ Flink supports different restart strategies which control how the jobs are resta
The cluster can be started with a default restart strategy which is always used when no job specific restart strategy has been defined.
In case that the job is submitted with a restart strategy, this strategy overrides the cluster's default setting.
+* This will be replaced by the TOC
+{:toc}
+
+## Overview
+
The default restart strategy is set via Flink's configuration file `flink-conf.yaml`.
The configuration parameter *restart-strategy* defines which strategy is taken.
If checkpointing is not enabled, the "no restart" strategy is used.
@@ -90,7 +95,11 @@ env.setRestartStrategy(RestartStrategies.fixedDelayRestart(
{% top %}
-## Fixed Delay Restart Strategy
+## Restart Strategies
+
+The following sections describe restart strategy specific configuration options.
+
+### Fixed Delay Restart Strategy
The fixed delay restart strategy attempts a given number of times to restart the job.
If the maximum number of attempts is exceeded, the job eventually fails.
@@ -125,6 +134,7 @@ restart-strategy: fixed-delay
</table>
For example:
+
~~~
restart-strategy.fixed-delay.attempts: 3
restart-strategy.fixed-delay.delay: 10 s
@@ -155,7 +165,7 @@ env.setRestartStrategy(RestartStrategies.fixedDelayRestart(
{% top %}
-## Failure Rate Restart Strategy
+### Failure Rate Restart Strategy
The failure rate restart strategy restarts job after failure, but when `failure rate` (failures per time interval) is exceeded, the job eventually fails.
In-between two consecutive restart attempts, the restart strategy waits a fixed amount of time.
@@ -226,7 +236,7 @@ env.setRestartStrategy(RestartStrategies.failureRateRestart(
{% top %}
-## No Restart Strategy
+### No Restart Strategy
The job fails directly and no restart is attempted.
@@ -251,7 +261,7 @@ env.setRestartStrategy(RestartStrategies.noRestart())
</div>
</div>
-## Fallback Restart Strategy
+### Fallback Restart Strategy
The cluster defined restart strategy is used.
This helpful for streaming programs which enable checkpointing.
http://git-wip-us.apache.org/repos/asf/flink/blob/8c21fa74/docs/setup/config.md
----------------------------------------------------------------------
diff --git a/docs/setup/config.md b/docs/setup/config.md
index ffd9700..512c08a 100644
--- a/docs/setup/config.md
+++ b/docs/setup/config.md
@@ -171,11 +171,11 @@ will be used under the directory specified by jobmanager.web.tmpdir.
- `restart-strategy`: Default [restart strategy]({{site.baseurl}}/dev/restart_strategies.html) to use in case no
restart strategy has been specified for the job.
The options are:
- - fixed delay strategy: "fixed-delay".
- - failure rate strategy: "failure-rate".
- - no restarts: "none"
+ - fixed delay strategy: `fixed-delay`.
+ - failure rate strategy: `failure-rate`.
+ - no restarts: `none`
- Default value is "none" unless checkpointing is enabled for the job in which case the default is "fixed-delay".
+ Default value is `none` unless checkpointing is enabled for the job in which case the default is `fixed-delay` with `Integer.MAX_VALUE` restart attempts and `10s` delay.
- `restart-strategy.fixed-delay.attempts`: Number of restart attempts, used if the default restart strategy is set to "fixed-delay".
Default value is 1, unless "fixed-delay" was activated by enabling checkpoints, in which case the default is `Integer.MAX_VALUE`.