[FLINK-8475][config][docs] Integrate HA options

This closes #5467.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/be2b911f
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/be2b911f
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/be2b911f

Branch: refs/heads/master
Commit: be2b911f2c75b21bd2d8f64cb5fb0ec3d2ad6426
Parents: 29dcec5
Author: zentol <ches...@apache.org>
Authored: Tue Jan 30 14:38:10 2018 +0100
Committer: zentol <ches...@apache.org>
Committed: Wed Feb 14 11:56:30 2018 +0100

----------------------------------------------------------------------
 .../high_availability_configuration.html        | 36 ++++++++++++++++++++
 docs/ops/config.md                              |  8 +----
 .../configuration/HighAvailabilityOptions.java  | 17 ++++++---
 3 files changed, 49 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/be2b911f/docs/_includes/generated/high_availability_configuration.html
----------------------------------------------------------------------
diff --git a/docs/_includes/generated/high_availability_configuration.html 
b/docs/_includes/generated/high_availability_configuration.html
new file mode 100644
index 0000000..471d726
--- /dev/null
+++ b/docs/_includes/generated/high_availability_configuration.html
@@ -0,0 +1,36 @@
+<table class="table table-bordered">
+    <thead>
+        <tr>
+            <th class="text-left" style="width: 20%">Key</th>
+            <th class="text-left" style="width: 15%">Default</th>
+            <th class="text-left" style="width: 65%">Description</th>
+        </tr>
+    </thead>
+    <tbody>
+        <tr>
+            <td><h5>high-availability</h5></td>
+            <td>"NONE"</td>
+            <td>Defines high-availability mode used for the cluster execution. 
To enable high-availability, set this mode to "ZOOKEEPER".</td>
+        </tr>
+        <tr>
+            <td><h5>high-availability.cluster-id</h5></td>
+            <td>"/default"</td>
+            <td>The ID of the Flink cluster, used to separate multiple Flink 
clusters from each other. Needs to be set for standalone clusters but is 
automatically inferred in YARN and Mesos.</td>
+        </tr>
+        <tr>
+            <td><h5>high-availability.job.delay</h5></td>
+            <td>(none)</td>
+            <td>The time before a JobManager after a fail over recovers the 
current jobs.</td>
+        </tr>
+        <tr>
+            <td><h5>high-availability.jobmanager.port</h5></td>
+            <td>"0"</td>
+            <td>Optional port (range) used by the job manager in 
high-availability mode.</td>
+        </tr>
+        <tr>
+            <td><h5>high-availability.storageDir</h5></td>
+            <td>(none)</td>
+            <td>File system path (URI) where Flink persists metadata in 
high-availability setups.</td>
+        </tr>
+    </tbody>
+</table>

http://git-wip-us.apache.org/repos/asf/flink/blob/be2b911f/docs/ops/config.md
----------------------------------------------------------------------
diff --git a/docs/ops/config.md b/docs/ops/config.md
index 22f9213..3a59279 100644
--- a/docs/ops/config.md
+++ b/docs/ops/config.md
@@ -381,13 +381,7 @@ of the JobManager, because the same ActorSystem is used. 
Its not possible to use
 
 ### High Availability (HA)
 
-- `high-availability`: Defines the high availability mode used for the cluster 
execution. Currently, Flink supports the following modes:
-  - `none` (default): No high availability. A single JobManager runs and no 
JobManager state is checkpointed.
-  - `zookeeper`: Supports the execution of multiple JobManagers and JobManager 
state checkpointing. Among the group of JobManagers, ZooKeeper elects one of 
them as the leader which is responsible for the cluster execution. In case of a 
JobManager failure, a standby JobManager will be elected as the new leader and 
is given the last checkpointed JobManager state. In order to use the 
'zookeeper' mode, it is mandatory to also define the 
`high-availability.zookeeper.quorum` configuration value.
-
-- `high-availability.cluster-id`: (Default `/default_ns` in standalone cluster 
mode, or the <yarn-application-id> under YARN) Defines the subdirectory under 
the root dir where the ZooKeeper HA mode will create znodes. This allows to 
isolate multiple applications on the same ZooKeeper. Previously this key was 
named `recovery.zookeeper.path.namespace` and 
`high-availability.zookeeper.path.namespace`.
-
-Previously this key was named `recovery.mode` and the default value was 
`standalone`.
+{% include generated/high_availability_configuration.html %}
 
 #### ZooKeeper-based HA Mode
 

http://git-wip-us.apache.org/repos/asf/flink/blob/be2b911f/flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java
----------------------------------------------------------------------
diff --git 
a/flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java
 
b/flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java
index 590271e..dc3f5e3 100644
--- 
a/flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java
+++ 
b/flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java
@@ -43,7 +43,9 @@ public class HighAvailabilityOptions {
        public static final ConfigOption<String> HA_MODE =
                        key("high-availability")
                        .defaultValue("NONE")
-                       .withDeprecatedKeys("recovery.mode");
+                       .withDeprecatedKeys("recovery.mode")
+                       .withDescription("Defines high-availability mode used 
for the cluster execution." +
+                               " To enable high-availability, set this mode to 
\"ZOOKEEPER\".");
 
        /**
         * The ID of the Flink cluster, used to separate multiple Flink clusters
@@ -52,7 +54,9 @@ public class HighAvailabilityOptions {
        public static final ConfigOption<String> HA_CLUSTER_ID =
                        key("high-availability.cluster-id")
                        .defaultValue("/default")
-                       
.withDeprecatedKeys("high-availability.zookeeper.path.namespace", 
"recovery.zookeeper.path.namespace");
+                       
.withDeprecatedKeys("high-availability.zookeeper.path.namespace", 
"recovery.zookeeper.path.namespace")
+                       .withDescription("The ID of the Flink cluster, used to 
separate multiple Flink clusters from each other." +
+                               " Needs to be set for standalone clusters but 
is automatically inferred in YARN and Mesos.");
 
        /**
         * File system path (URI) where Flink persists metadata in 
high-availability setups.
@@ -60,7 +64,8 @@ public class HighAvailabilityOptions {
        public static final ConfigOption<String> HA_STORAGE_PATH =
                        key("high-availability.storageDir")
                        .noDefaultValue()
-                       
.withDeprecatedKeys("high-availability.zookeeper.storageDir", 
"recovery.zookeeper.storageDir");
+                       
.withDeprecatedKeys("high-availability.zookeeper.storageDir", 
"recovery.zookeeper.storageDir")
+                       .withDescription("File system path (URI) where Flink 
persists metadata in high-availability setups.");
 
 
        // 
------------------------------------------------------------------------
@@ -73,7 +78,8 @@ public class HighAvailabilityOptions {
        public static final ConfigOption<String> HA_JOB_MANAGER_PORT_RANGE =
                        key("high-availability.jobmanager.port")
                        .defaultValue("0")
-                       .withDeprecatedKeys("recovery.jobmanager.port");
+                       .withDeprecatedKeys("recovery.jobmanager.port")
+                       .withDescription("Optional port (range) used by the job 
manager in high-availability mode.");
 
        /**
         * The time before a JobManager after a fail over recovers the current 
jobs.
@@ -81,7 +87,8 @@ public class HighAvailabilityOptions {
        public static final ConfigOption<String> HA_JOB_DELAY =
                        key("high-availability.job.delay")
                        .noDefaultValue()
-                       .withDeprecatedKeys("recovery.job.delay");
+                       .withDeprecatedKeys("recovery.job.delay")
+                       .withDescription("The time before a JobManager after a 
fail over recovers the current jobs.");
 
        // 
------------------------------------------------------------------------
        //  ZooKeeper Options

Reply via email to