Skip to content

Commit

Permalink
[FLINK-5978] Move JM WebFrontend address ConfigOption to JMOptions
Browse files Browse the repository at this point in the history
This closes apache#3552.
  • Loading branch information
mengji.fy authored and zentol committed May 9, 2017
1 parent 5c4560d commit 160daa6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,12 @@ public final class ConfigConstants {

// ------------------------- JobManager Web Frontend ----------------------

/** The config key for the address of the JobManager web frontend. */
/**
* The config key for the address of the JobManager web frontend.
*
* @deprecated use {@link JobManagerOptions#WEB_FRONTEND_ADDRESS} instead
*/
@Deprecated
public static final ConfigOption<String> DEFAULT_JOB_MANAGER_WEB_FRONTEND_ADDRESS =
key("jobmanager.web.address")
.noDefaultValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ public class JobManagerOptions {
// JobManager web UI
// ------------------------------------------------------------------------

/**
* Config parameter defining the runtime monitor web-frontend server address.
*/
public static final ConfigOption<String> WEB_FRONTEND_ADDRESS =
key("jobmanager.web.address")
.noDefaultValue();

/**
* The port for the runtime monitor web-frontend server.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import org.apache.flink.configuration.ConfigConstants;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.configuration.JobManagerOptions;

public class WebMonitorConfig {

Expand Down Expand Up @@ -62,7 +63,7 @@ public WebMonitorConfig(Configuration config) {
}

public String getWebFrontendAddress() {
return config.getValue(ConfigConstants.DEFAULT_JOB_MANAGER_WEB_FRONTEND_ADDRESS);
return config.getValue(JobManagerOptions.WEB_FRONTEND_ADDRESS);
}

public int getWebFrontendPort() {
Expand Down

0 comments on commit 160daa6

Please sign in to comment.