-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-7408] [conf] Create WebOptions for WebRuntimeMonitor #4512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit moves the WebRuntimeMonitor related configuration options from JobManagerOptions to WebOptions. Moreover, it removes the prefix jobmanager.
zentol
left a comment
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace after && seems off.
|
Thanks for the review @zentol. You're right that we should remove the |
3a9060e to
4033fad
Compare
|
Merging this PR. |
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:
@Public(Evolving): (yes)Documentation