You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by dw...@apache.org on 2018/07/19 12:05:57 UTC

flink git commit: [FLINK-9871] Use Description class for ConfigOptions with rich formatting

Repository: flink
Updated Branches:
  refs/heads/master 6a56e48c7 -> 0cb7706da


[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/0cb7706d
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/0cb7706d
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/0cb7706d

Branch: refs/heads/master
Commit: 0cb7706dad74133652983a132d70ba4ded4aff9b
Parents: 6a56e48
Author: Dawid Wysakowicz <dw...@apache.org>
Authored: Tue Jul 17 11:25:42 2018 +0200
Committer: Dawid Wysakowicz <dw...@apache.org>
Committed: Thu Jul 19 14:02:18 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/0cb7706d/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 &lt;a href="http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector"&gt;here&lt;/a&gt;.</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 &lt;a href="http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector"&gt;here&lt;/a&gt;.</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 &lt;a href="http://doc.akka.io/docs/akka/snapshot/scala/remoting.html#failure-detector"&gt;here&lt;/a&gt;.</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/0cb7706d/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 &lt;a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#ciphersuites"&gt;here&lt;/a&gt;.</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/0cb7706d/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/0cb7706d/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.