You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2018/05/10 11:48:49 UTC

[02/17] flink git commit: [FLINK-9179][REST] Deduplicate WebOptions.PORT and RestOptions.PORT

[FLINK-9179][REST] Deduplicate WebOptions.PORT and RestOptions.PORT

This closes #5856.


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

Branch: refs/heads/release-1.5
Commit: 8e0b5aaa551d61b4f4e350893a217d35eda79fcc
Parents: 758f6d9
Author: zhangminglei <zm...@163.com>
Authored: Tue Apr 24 23:31:24 2018 +0800
Committer: zentol <ch...@apache.org>
Committed: Thu May 10 08:27:08 2018 +0200

----------------------------------------------------------------------
 docs/_includes/generated/web_configuration.html                 | 5 -----
 docs/monitoring/rest_api.md                                     | 2 +-
 docs/ops/deployment/mesos.md                                    | 4 ++--
 .../main/java/org/apache/flink/configuration/RestOptions.java   | 1 +
 .../main/java/org/apache/flink/configuration/WebOptions.java    | 3 +++
 flink-dist/src/main/resources/flink-conf.yaml                   | 2 +-
 flink-end-to-end-tests/test-scripts/common.sh                   | 2 +-
 .../java/org/apache/flink/api/java/ExecutionEnvironment.java    | 2 +-
 .../scala/org/apache/flink/api/scala/ExecutionEnvironment.scala | 2 +-
 .../streaming/api/environment/StreamExecutionEnvironment.java   | 2 +-
 .../flink/streaming/api/scala/StreamExecutionEnvironment.scala  | 2 +-
 11 files changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/8e0b5aaa/docs/_includes/generated/web_configuration.html
----------------------------------------------------------------------
diff --git a/docs/_includes/generated/web_configuration.html b/docs/_includes/generated/web_configuration.html
index d4f5a7e..dbc353d 100644
--- a/docs/_includes/generated/web_configuration.html
+++ b/docs/_includes/generated/web_configuration.html
@@ -53,11 +53,6 @@
             <td></td>
         </tr>
         <tr>
-            <td><h5>web.port</h5></td>
-            <td style="word-wrap: break-word;">8081</td>
-            <td></td>
-        </tr>
-        <tr>
             <td><h5>web.refresh-interval</h5></td>
             <td style="word-wrap: break-word;">3000</td>
             <td></td>

http://git-wip-us.apache.org/repos/asf/flink/blob/8e0b5aaa/docs/monitoring/rest_api.md
----------------------------------------------------------------------
diff --git a/docs/monitoring/rest_api.md b/docs/monitoring/rest_api.md
index ae4f38b..d6927de 100644
--- a/docs/monitoring/rest_api.md
+++ b/docs/monitoring/rest_api.md
@@ -33,7 +33,7 @@ The monitoring API is a REST-ful API that accepts HTTP GET requests and responds
 
 ## Overview
 
-The monitoring API is backed by a web server that runs as part of the *JobManager*. By default, this server listens at post `8081`, which can be configured in `flink-conf.yaml` via `jobmanager.web.port`. Note that the monitoring API web server and the web dashboard web server are currently the same and thus run together at the same port. They respond to different HTTP URLs, though.
+The monitoring API is backed by a web server that runs as part of the *JobManager*. By default, this server listens at post `8081`, which can be configured in `flink-conf.yaml` via `rest.port`. Note that the monitoring API web server and the web dashboard web server are currently the same and thus run together at the same port. They respond to different HTTP URLs, though.
 
 In the case of multiple JobManagers (for high availability), each JobManager will run its own instance of the monitoring API, which offers information about completed and running job while that JobManager was elected the cluster leader.
 

http://git-wip-us.apache.org/repos/asf/flink/blob/8e0b5aaa/docs/ops/deployment/mesos.md
----------------------------------------------------------------------
diff --git a/docs/ops/deployment/mesos.md b/docs/ops/deployment/mesos.md
index 74bae39..0b27e45 100644
--- a/docs/ops/deployment/mesos.md
+++ b/docs/ops/deployment/mesos.md
@@ -187,7 +187,7 @@ For example:
         -Dmesos.master=master.foobar.org:5050 \
         -Djobmanager.heap.mb=1024 \
         -Djobmanager.rpc.port=6123 \
-        -Djobmanager.web.port=8081 \
+        -Drest.port=8081 \
         -Dmesos.initial-tasks=10 \
         -Dmesos.resourcemanager.tasks.mem=4096 \
         -Dtaskmanager.heap.mb=3500 \
@@ -211,7 +211,7 @@ Here is an example configuration for Marathon:
 
     {
         "id": "flink",
-        "cmd": "$FLINK_HOME/bin/mesos-appmaster.sh -Djobmanager.heap.mb=1024 -Djobmanager.rpc.port=6123 -Djobmanager.web.port=8081 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=1024 -Dtaskmanager.numberOfTaskSlots=2 -Dparallelism.default=2 -Dmesos.resourcemanager.tasks.cpus=1",
+        "cmd": "$FLINK_HOME/bin/mesos-appmaster.sh -Djobmanager.heap.mb=1024 -Djobmanager.rpc.port=6123 -Drest.port=8081 -Dmesos.initial-tasks=1 -Dmesos.resourcemanager.tasks.mem=1024 -Dtaskmanager.heap.mb=1024 -Dtaskmanager.numberOfTaskSlots=2 -Dparallelism.default=2 -Dmesos.resourcemanager.tasks.cpus=1",
         "cpus": 1.0,
         "mem": 1024
     }

http://git-wip-us.apache.org/repos/asf/flink/blob/8e0b5aaa/flink-core/src/main/java/org/apache/flink/configuration/RestOptions.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/configuration/RestOptions.java b/flink-core/src/main/java/org/apache/flink/configuration/RestOptions.java
index 5cbd027..1b2c39e 100644
--- a/flink-core/src/main/java/org/apache/flink/configuration/RestOptions.java
+++ b/flink-core/src/main/java/org/apache/flink/configuration/RestOptions.java
@@ -51,6 +51,7 @@ public class RestOptions {
 	public static final ConfigOption<Integer> PORT =
 		key("rest.port")
 			.defaultValue(8081)
+			.withDeprecatedKeys("web.port")
 			.withDescription("The port that the server listens on / the client connects to.");
 
 	/**

http://git-wip-us.apache.org/repos/asf/flink/blob/8e0b5aaa/flink-core/src/main/java/org/apache/flink/configuration/WebOptions.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/configuration/WebOptions.java b/flink-core/src/main/java/org/apache/flink/configuration/WebOptions.java
index ff640cc..6d0a6ec 100644
--- a/flink-core/src/main/java/org/apache/flink/configuration/WebOptions.java
+++ b/flink-core/src/main/java/org/apache/flink/configuration/WebOptions.java
@@ -39,7 +39,10 @@ public class WebOptions {
 
 	/**
 	 * The port for the runtime monitor web-frontend server.
+	 *
+	 * @deprecated Use {@link RestOptions#PORT} instead
 	 */
+	@Deprecated
 	public static final ConfigOption<Integer> PORT =
 		key("web.port")
 			.defaultValue(8081)

http://git-wip-us.apache.org/repos/asf/flink/blob/8e0b5aaa/flink-dist/src/main/resources/flink-conf.yaml
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/resources/flink-conf.yaml b/flink-dist/src/main/resources/flink-conf.yaml
index 753f303..04d3b93 100644
--- a/flink-dist/src/main/resources/flink-conf.yaml
+++ b/flink-dist/src/main/resources/flink-conf.yaml
@@ -131,7 +131,7 @@ parallelism.default: 1
 # The port under which the web-based runtime monitor listens.
 # A value of -1 deactivates the web server.
 
-web.port: 8081
+rest.port: 8081
 
 # Flag to specify whether job submission is enabled from the web-based
 # runtime monitor. Uncomment to disable.

http://git-wip-us.apache.org/repos/asf/flink/blob/8e0b5aaa/flink-end-to-end-tests/test-scripts/common.sh
----------------------------------------------------------------------
diff --git a/flink-end-to-end-tests/test-scripts/common.sh b/flink-end-to-end-tests/test-scripts/common.sh
index b08fc17..da460fa 100644
--- a/flink-end-to-end-tests/test-scripts/common.sh
+++ b/flink-end-to-end-tests/test-scripts/common.sh
@@ -113,7 +113,7 @@ function create_ha_config() {
     # Web Frontend
     #==============================================================================
 
-    web.port: 8081
+    rest.port: 8081
 EOL
 }
 

http://git-wip-us.apache.org/repos/asf/flink/blob/8e0b5aaa/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
----------------------------------------------------------------------
diff --git a/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java b/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
index 3d858aa..5a5bddb 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
@@ -1117,7 +1117,7 @@ public abstract class ExecutionEnvironment {
 	 * the same JVM as the environment was created in. It will use the parallelism specified in the
 	 * parameter.
 	 *
-	 * <p>If the configuration key 'jobmanager.web.port' was set in the configuration, that particular
+	 * <p>If the configuration key 'rest.port' was set in the configuration, that particular
 	 * port will be used for the web UI. Otherwise, the default port (8081) will be used.
 	 */
 	@PublicEvolving

http://git-wip-us.apache.org/repos/asf/flink/blob/8e0b5aaa/flink-scala/src/main/scala/org/apache/flink/api/scala/ExecutionEnvironment.scala
----------------------------------------------------------------------
diff --git a/flink-scala/src/main/scala/org/apache/flink/api/scala/ExecutionEnvironment.scala b/flink-scala/src/main/scala/org/apache/flink/api/scala/ExecutionEnvironment.scala
index bc24ad0..9f53123 100644
--- a/flink-scala/src/main/scala/org/apache/flink/api/scala/ExecutionEnvironment.scala
+++ b/flink-scala/src/main/scala/org/apache/flink/api/scala/ExecutionEnvironment.scala
@@ -633,7 +633,7 @@ object ExecutionEnvironment {
    * the same JVM as the environment was created in. It will use the parallelism specified in the
    * parameter.
    *
-   * If the configuration key 'jobmanager.web.port' was set in the configuration, that particular
+   * If the configuration key 'rest.port' was set in the configuration, that particular
    * port will be used for the web UI. Otherwise, the default port (8081) will be used.
    *
    * @param config optional config for the local execution

http://git-wip-us.apache.org/repos/asf/flink/blob/8e0b5aaa/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
index 624c938..83ca4a6 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
@@ -1671,7 +1671,7 @@ public abstract class StreamExecutionEnvironment {
 	 * the same JVM as the environment was created in. It will use the parallelism specified in the
 	 * parameter.
 	 *
-	 * <p>If the configuration key 'jobmanager.web.port' was set in the configuration, that particular
+	 * <p>If the configuration key 'rest.port' was set in the configuration, that particular
 	 * port will be used for the web UI. Otherwise, the default port (8081) will be used.
 	 */
 	@PublicEvolving

http://git-wip-us.apache.org/repos/asf/flink/blob/8e0b5aaa/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
----------------------------------------------------------------------
diff --git a/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala b/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
index 9410a95..9aac431 100644
--- a/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
+++ b/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
@@ -803,7 +803,7 @@ object StreamExecutionEnvironment {
    * the same JVM as the environment was created in. It will use the parallelism specified in the
    * parameter.
    *
-   * If the configuration key 'jobmanager.web.port' was set in the configuration, that particular
+   * If the configuration key 'rest.port' was set in the configuration, that particular
    * port will be used for the web UI. Otherwise, the default port (8081) will be used.
    *
    * @param config optional config for the local execution