Repository: flink Updated Branches: refs/heads/release-1.6 49c6f385d -> 41d4d8d00
[FLINK-9871] Use Description class for ConfigOptions with rich formatting This closes #6371 Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/41d4d8d0 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/41d4d8d0 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/41d4d8d0 Branch: refs/heads/release-1.6 Commit: 41d4d8d00ee0a9a73a7674a3b3143a5452cd436d Parents: 49c6f38 Author: Dawid Wysakowicz <[email protected]> Authored: Tue Jul 17 11:25:42 2018 +0200 Committer: Dawid Wysakowicz <[email protected]> Committed: Thu Jul 19 14:06:52 2018 +0200 ---------------------------------------------------------------------- .../_includes/generated/akka_configuration.html | 6 ++-- .../generated/security_configuration.html | 2 +- .../apache/flink/configuration/AkkaOptions.java | 34 +++++++++++++------- .../flink/configuration/SecurityOptions.java | 10 ++++-- 4 files changed, 34 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/41d4d8d0/docs/_includes/generated/akka_configuration.html ---------------------------------------------------------------------- diff --git a/docs/_includes/generated/akka_configuration.html b/docs/_includes/generated/akka_configuration.html index a2b49c7..352c656 100644 --- a/docs/_includes/generated/akka_configuration.html +++ b/docs/_includes/generated/akka_configuration.html @@ -80,17 +80,17 @@ <tr> <td><h5>akka.watch.heartbeat.interval</h5></td> <td style="word-wrap: break-word;">"10 s"</td> - <td>Heartbeat interval for Akkaâs DeathWatch mechanism to detect dead TaskManagers. If TaskManagers are wrongly marked dead because of lost or delayed heartbeat messages, then you should decrease this value or increase akka.watch.heartbeat.pause. A thorough description of Akkaâs DeathWatch can be found <a href="http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector">here</a>.</td> + <td>Heartbeat interval for Akkaâs DeathWatch mechanism to detect dead TaskManagers. If TaskManagers are wrongly marked dead because of lost or delayed heartbeat messages, then you should decrease this value or increase akka.watch.heartbeat.pause. A thorough description of Akkaâs DeathWatch can be found <a href="http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector">here</a></td> </tr> <tr> <td><h5>akka.watch.heartbeat.pause</h5></td> <td style="word-wrap: break-word;">"60 s"</td> - <td>Acceptable heartbeat pause for Akkaâs DeathWatch mechanism. A low value does not allow an irregular heartbeat. If TaskManagers are wrongly marked dead because of lost or delayed heartbeat messages, then you should increase this value or decrease akka.watch.heartbeat.interval. Higher value increases the time to detect a dead TaskManager. A thorough description of Akkaâs DeathWatch can be found <a href="http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector">here</a>.</td> + <td>Acceptable heartbeat pause for Akkaâs DeathWatch mechanism. A low value does not allow an irregular heartbeat. If TaskManagers are wrongly marked dead because of lost or delayed heartbeat messages, then you should increase this value or decrease akka.watch.heartbeat.interval. Higher value increases the time to detect a dead TaskManager. A thorough description of Akkaâs DeathWatch can be found <a href="http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector">here</a></td> </tr> <tr> <td><h5>akka.watch.threshold</h5></td> <td style="word-wrap: break-word;">12</td> - <td>Threshold for the DeathWatch failure detector. A low value is prone to false positives whereas a high value increases the time to detect a dead TaskManager. A thorough description of Akkaâs DeathWatch can be found <a href="http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector">here</a>.</td> + <td>Threshold for the DeathWatch failure detector. A low value is prone to false positives whereas a high value increases the time to detect a dead TaskManager. A thorough description of Akkaâs DeathWatch can be found <a href="http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector">here</a></td> </tr> </tbody> </table> http://git-wip-us.apache.org/repos/asf/flink/blob/41d4d8d0/docs/_includes/generated/security_configuration.html ---------------------------------------------------------------------- diff --git a/docs/_includes/generated/security_configuration.html b/docs/_includes/generated/security_configuration.html index 47846ae..19d0287 100644 --- a/docs/_includes/generated/security_configuration.html +++ b/docs/_includes/generated/security_configuration.html @@ -10,7 +10,7 @@ <tr> <td><h5>security.ssl.algorithms</h5></td> <td style="word-wrap: break-word;">"TLS_RSA_WITH_AES_128_CBC_SHA"</td> - <td>The comma separated list of standard SSL algorithms to be supported. Read more <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#ciphersuites">here</a>.</td> + <td>The comma separated list of standard SSL algorithms to be supported. Read more <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#ciphersuites">here</a></td> </tr> <tr> <td><h5>security.ssl.internal.enabled</h5></td> http://git-wip-us.apache.org/repos/asf/flink/blob/41d4d8d0/flink-core/src/main/java/org/apache/flink/configuration/AkkaOptions.java ---------------------------------------------------------------------- diff --git a/flink-core/src/main/java/org/apache/flink/configuration/AkkaOptions.java b/flink-core/src/main/java/org/apache/flink/configuration/AkkaOptions.java index 360ba86..43c7876 100644 --- a/flink-core/src/main/java/org/apache/flink/configuration/AkkaOptions.java +++ b/flink-core/src/main/java/org/apache/flink/configuration/AkkaOptions.java @@ -19,6 +19,9 @@ package org.apache.flink.configuration; import org.apache.flink.annotation.PublicEvolving; +import org.apache.flink.configuration.description.Description; + +import static org.apache.flink.configuration.description.LinkElement.link; /** * Akka configuration options. @@ -42,10 +45,12 @@ public class AkkaOptions { public static final ConfigOption<String> WATCH_HEARTBEAT_INTERVAL = ConfigOptions .key("akka.watch.heartbeat.interval") .defaultValue(ASK_TIMEOUT.defaultValue()) - .withDescription("Heartbeat interval for Akkaâs DeathWatch mechanism to detect dead TaskManagers. If" + - " TaskManagers are wrongly marked dead because of lost or delayed heartbeat messages, then you should" + - " decrease this value or increase akka.watch.heartbeat.pause. A thorough description of Akkaâs DeathWatch" + - " can be found <a href=\"http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector\">here</a>."); + .withDescription(Description.builder() + .text("Heartbeat interval for Akkaâs DeathWatch mechanism to detect dead TaskManagers. If" + + " TaskManagers are wrongly marked dead because of lost or delayed heartbeat messages, then you" + + " should decrease this value or increase akka.watch.heartbeat.pause. A thorough description of" + + " Akkaâs DeathWatch can be found %s", + link("http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector", "here")).build()); /** * The maximum acceptable Akka death watch heartbeat pause. @@ -53,11 +58,14 @@ public class AkkaOptions { public static final ConfigOption<String> WATCH_HEARTBEAT_PAUSE = ConfigOptions .key("akka.watch.heartbeat.pause") .defaultValue("60 s") - .withDescription("Acceptable heartbeat pause for Akkaâs DeathWatch mechanism. A low value does not allow an" + - " irregular heartbeat. If TaskManagers are wrongly marked dead because of lost or delayed heartbeat messages," + - " then you should increase this value or decrease akka.watch.heartbeat.interval. Higher value increases the" + - " time to detect a dead TaskManager. A thorough description of Akkaâs DeathWatch can be found" + - " <a href=\"http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector\">here</a>."); + .withDescription(Description.builder() + .text("Acceptable heartbeat pause for Akkaâs DeathWatch mechanism. A low value does not allow an" + + " irregular heartbeat. If TaskManagers are wrongly marked dead because of lost or delayed" + + " heartbeat messages, then you should increase this value or decrease akka.watch.heartbeat.interval." + + " Higher value increases the time to detect a dead TaskManager. A thorough description of Akkaâs" + + " DeathWatch can be found %s", + link("http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector", "here") + ).build()); /** * The Akka tcp connection timeout. */ @@ -112,9 +120,11 @@ public class AkkaOptions { public static final ConfigOption<Integer> WATCH_THRESHOLD = ConfigOptions .key("akka.watch.threshold") .defaultValue(12) - .withDescription("Threshold for the DeathWatch failure detector. A low value is prone to false positives whereas" + - " a high value increases the time to detect a dead TaskManager. A thorough description of Akkaâs DeathWatch" + - " can be found <a href=\"http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector\">here</a>."); + .withDescription(Description.builder() + .text("Threshold for the DeathWatch failure detector. A low value is prone to false positives whereas" + + " a high value increases the time to detect a dead TaskManager. A thorough description of Akkaâs" + + " DeathWatch can be found %s", + link("http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector", "here")).build()); /** * Override SSL support for the Akka transport. http://git-wip-us.apache.org/repos/asf/flink/blob/41d4d8d0/flink-core/src/main/java/org/apache/flink/configuration/SecurityOptions.java ---------------------------------------------------------------------- diff --git a/flink-core/src/main/java/org/apache/flink/configuration/SecurityOptions.java b/flink-core/src/main/java/org/apache/flink/configuration/SecurityOptions.java index 03ee4f2..750170c 100644 --- a/flink-core/src/main/java/org/apache/flink/configuration/SecurityOptions.java +++ b/flink-core/src/main/java/org/apache/flink/configuration/SecurityOptions.java @@ -22,8 +22,10 @@ import org.apache.flink.annotation.PublicEvolving; import org.apache.flink.annotation.docs.ConfigGroup; import org.apache.flink.annotation.docs.ConfigGroups; import org.apache.flink.annotation.docs.Documentation; +import org.apache.flink.configuration.description.Description; import static org.apache.flink.configuration.ConfigOptions.key; +import static org.apache.flink.configuration.description.LinkElement.link; /** * The set of configuration options relating to security. @@ -274,8 +276,12 @@ public class SecurityOptions { public static final ConfigOption<String> SSL_ALGORITHMS = key("security.ssl.algorithms") .defaultValue("TLS_RSA_WITH_AES_128_CBC_SHA") - .withDescription("The comma separated list of standard SSL algorithms to be supported. Read more" + - " <a href=\"http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#ciphersuites\">here</a>."); + .withDescription(Description.builder() + .text("The comma separated list of standard SSL algorithms to be supported. Read more %s", + link( + "http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#ciphersuites", + "here")) + .build()); /** * Flag to enable/disable hostname verification for the ssl connections.
