Skip to content

Conversation

@tillrohrmann
Copy link
Contributor

What is the purpose of the change

This commit moves the WebRuntimeMonitor related configuration options from
JobManagerOptions to WebOptions. Moreover, it removes the prefix jobmanager.

As you've requested @zentol.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)

Documentation

  • Does this pull request introduce a new feature? (no)

This commit moves the WebRuntimeMonitor related configuration options from
JobManagerOptions to WebOptions. Moreover, it removes the prefix jobmanager.
Copy link
Contributor

@zentol zentol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 whitespace issue, and a few unecessary calls to ConfigOption#key() that we could remove since we touch the lines anyway, otherwise +1.

if(
config.getBoolean(ConfigConstants.LOCAL_START_WEBSERVER, false) &&
config.getInteger(JobManagerOptions.WEB_PORT.key(), 0) >= 0) {
config.getInteger(WebOptions.PORT.key(), 0) >= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can drop the call to key().

// if a web monitor shall be started, set the port to random binding
if (configuration.getInteger(JobManagerOptions.WEB_PORT.key(), 0) >= 0) {
configuration.setInteger(JobManagerOptions.WEB_PORT, 0);
if (configuration.getInteger(WebOptions.PORT.key(), 0) >= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop call to key()

// if a web monitor shall be started, set the port to random binding
if (configuration.getInteger(JobManagerOptions.WEB_PORT.key(), 0) >= 0) {
configuration.setInteger(JobManagerOptions.WEB_PORT, 0);
if (configuration.getInteger(WebOptions.PORT.key(), 0) >= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop call to key()


val webMonitor: Option[WebMonitor] =
if (configuration.getInteger(JobManagerOptions.WEB_PORT.key(), 0) >= 0) {
if (configuration.getInteger(WebOptions.PORT.key(), 0) >= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop call to key()

config.setInteger(JobManagerOptions.PORT, Integer.parseInt(address.port().get().toString()));

if (config.getInteger(JobManagerOptions.WEB_PORT.key(), 0) >= 0) {
if (config.getInteger(WebOptions.PORT.key(), 0) >= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop call to key()


// Config to enable https access to the web-ui
boolean enableSSL = config.getBoolean(JobManagerOptions.WEB_SSL_ENABLED) && SSLUtils.getSSLEnabled(config);
boolean enableSSL = config.getBoolean(WebOptions.SSL_ENABLED) && SSLUtils.getSSLEnabled(config);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace after && seems off.

@tillrohrmann
Copy link
Contributor Author

Thanks for the review @zentol. You're right that we should remove the key() method calls.

@tillrohrmann tillrohrmann force-pushed the portWebMonitorOptions branch from 3a9060e to 4033fad Compare August 10, 2017 15:40
@tillrohrmann
Copy link
Contributor Author

Merging this PR.

@asfgit asfgit closed this in c685251 Aug 11, 2017
@tillrohrmann tillrohrmann deleted the portWebMonitorOptions branch May 29, 2018 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants