You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2017/08/10 09:48:56 UTC

[GitHub] flink pull request #4512: [FLINK-7408] [conf] Create WebOptions for WebRunti...

GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/4512

    [FLINK-7408] [conf] Create WebOptions for WebRuntimeMonitor

    ## 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)
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink portWebMonitorOptions

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4512.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4512
    
----
commit 34c0fcb40f9704f6eab6a9cc520e9a27b91ff0d0
Author: Till Rohrmann <tr...@apache.org>
Date:   2017-08-10T09:42:09Z

    [FLINK-7408] [conf] Create WebOptions for WebRuntimeMonitor
    
    This commit moves the WebRuntimeMonitor related configuration options from
    JobManagerOptions to WebOptions. Moreover, it removes the prefix jobmanager.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #4512: [FLINK-7408] [conf] Create WebOptions for WebRunti...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4512#discussion_r132426290
  
    --- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/entrypoint/YarnEntrypointUtils.java ---
    @@ -104,8 +105,8 @@ public static Configuration loadConfiguration(String workingDirectory, Map<Strin
     		}
     
     		// 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) {
    --- End diff --
    
    drop call to `key()`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #4512: [FLINK-7408] [conf] Create WebOptions for WebRunti...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/4512


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #4512: [FLINK-7408] [conf] Create WebOptions for WebRunti...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4512#discussion_r132426305
  
    --- Diff: flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala ---
    @@ -2216,7 +2216,7 @@ object JobManager {
         : (ActorRef, ActorRef, Option[WebMonitor], Option[ActorRef]) = {
     
         val webMonitor: Option[WebMonitor] =
    -      if (configuration.getInteger(JobManagerOptions.WEB_PORT.key(), 0) >= 0) {
    +      if (configuration.getInteger(WebOptions.PORT.key(), 0) >= 0) {
    --- End diff --
    
    drop call to `key()`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #4512: [FLINK-7408] [conf] Create WebOptions for WebRunti...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4512#discussion_r132426478
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java ---
    @@ -214,7 +214,7 @@ public WebRuntimeMonitor(
     		ExecutionContextExecutor context = ExecutionContext$.MODULE$.fromExecutor(executorService);
     
     		// 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);
    --- End diff --
    
    whitespace after `&&` seems off.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #4512: [FLINK-7408] [conf] Create WebOptions for WebRuntimeMonit...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/4512
  
    Thanks for the review @zentol. You're right that we should remove the `key()` method calls.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #4512: [FLINK-7408] [conf] Create WebOptions for WebRuntimeMonit...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/4512
  
    Merging this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #4512: [FLINK-7408] [conf] Create WebOptions for WebRunti...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4512#discussion_r132426338
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java ---
    @@ -188,7 +189,7 @@ public static WebMonitor startWebMonitorIfConfigured(
     		config.setString(JobManagerOptions.ADDRESS, address.host().get());
     		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) {
    --- End diff --
    
    drop call to `key()`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #4512: [FLINK-7408] [conf] Create WebOptions for WebRunti...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4512#discussion_r132426175
  
    --- Diff: flink-runtime/src/main/scala/org/apache/flink/runtime/minicluster/FlinkMiniCluster.scala ---
    @@ -388,7 +388,7 @@ abstract class FlinkMiniCluster(
         : Option[WebMonitor] = {
         if(
           config.getBoolean(ConfigConstants.LOCAL_START_WEBSERVER, false) &&
    -        config.getInteger(JobManagerOptions.WEB_PORT.key(), 0) >= 0) {
    +        config.getInteger(WebOptions.PORT.key(), 0) >= 0) {
    --- End diff --
    
    you can drop the call to `key()`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #4512: [FLINK-7408] [conf] Create WebOptions for WebRunti...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4512#discussion_r132426263
  
    --- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/YarnApplicationMasterRunner.java ---
    @@ -510,8 +511,8 @@ private static Configuration createConfiguration(String baseDirectory, Map<Strin
     		}
     
     		// 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) {
    --- End diff --
    
    drop call to `key()`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---