You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2018/08/01 07:54:20 UTC

[flink] branch master updated (6b262cb -> b3df1f9)

This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git.


    from 6b262cb  [FLINK-9986][build] Only include commit info in .version.properties file
     new 975c85e  [FLINK-9988][rest] Add deprecated keys for server bind address
     new b3df1f9  [FLINK-9988][rest] Add RestOptionTest for deprecated BIND_ADDRESS keys

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/flink/configuration/RestOptions.java    |  1 +
 ...gurationUtilsTest.java => RestOptionsTest.java} | 33 +++++++++++-----------
 2 files changed, 18 insertions(+), 16 deletions(-)
 copy flink-core/src/test/java/org/apache/flink/configuration/{ConfigurationUtilsTest.java => RestOptionsTest.java} (56%)


[flink] 01/02: [FLINK-9988][rest] Add deprecated keys for server bind address

Posted by tr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 975c85eda7bd2c07f35e45cd17005793ab4fa851
Author: zentol <ch...@apache.org>
AuthorDate: Fri Jul 27 17:43:01 2018 +0200

    [FLINK-9988][rest] Add deprecated keys for server bind address
---
 flink-core/src/main/java/org/apache/flink/configuration/RestOptions.java | 1 +
 1 file changed, 1 insertion(+)

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 1b2c39e..5ac5a55 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
@@ -34,6 +34,7 @@ public class RestOptions {
 	public static final ConfigOption<String> BIND_ADDRESS =
 		key("rest.bind-address")
 			.noDefaultValue()
+			.withDeprecatedKeys(WebOptions.ADDRESS.key(), "jobmanager.web.address")
 			.withDescription("The address that the server binds itself.");
 
 	/**


[flink] 02/02: [FLINK-9988][rest] Add RestOptionTest for deprecated BIND_ADDRESS keys

Posted by tr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit b3df1f963d25e7b7b6109d643090c2dff624ab2f
Author: Till Rohrmann <tr...@apache.org>
AuthorDate: Tue Jul 31 14:58:20 2018 +0200

    [FLINK-9988][rest] Add RestOptionTest for deprecated BIND_ADDRESS keys
    
    This closes #6441.
---
 .../apache/flink/configuration/RestOptions.java    |  2 +-
 .../flink/configuration/RestOptionsTest.java       | 55 ++++++++++++++++++++++
 2 files changed, 56 insertions(+), 1 deletion(-)

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 5ac5a55..3c24158 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
@@ -34,7 +34,7 @@ public class RestOptions {
 	public static final ConfigOption<String> BIND_ADDRESS =
 		key("rest.bind-address")
 			.noDefaultValue()
-			.withDeprecatedKeys(WebOptions.ADDRESS.key(), "jobmanager.web.address")
+			.withDeprecatedKeys(WebOptions.ADDRESS.key(), ConfigConstants.DEFAULT_JOB_MANAGER_WEB_FRONTEND_ADDRESS.key())
 			.withDescription("The address that the server binds itself.");
 
 	/**
diff --git a/flink-core/src/test/java/org/apache/flink/configuration/RestOptionsTest.java b/flink-core/src/test/java/org/apache/flink/configuration/RestOptionsTest.java
new file mode 100644
index 0000000..9c9e6b9
--- /dev/null
+++ b/flink-core/src/test/java/org/apache/flink/configuration/RestOptionsTest.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.configuration;
+
+import org.apache.flink.util.TestLogger;
+
+import org.junit.Test;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * Tests for the {@link RestOptions}.
+ */
+public class RestOptionsTest extends TestLogger {
+
+	@Test
+	public void testBindAddressFirstDeprecatedKey() {
+		final Configuration configuration = new Configuration();
+		final String expectedAddress = "foobar";
+		configuration.setString("web.address", expectedAddress);
+
+		final String actualAddress = configuration.getString(RestOptions.BIND_ADDRESS);
+
+		assertThat(actualAddress, is(equalTo(expectedAddress)));
+	}
+
+	@Test
+	public void testBindAddressSecondDeprecatedKey() {
+		final Configuration configuration = new Configuration();
+		final String expectedAddress = "foobar";
+		configuration.setString("jobmanager.web.address", expectedAddress);
+
+		final String actualAddress = configuration.getString(RestOptions.BIND_ADDRESS);
+
+		assertThat(actualAddress, is(equalTo(expectedAddress)));
+	}
+}