You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by yanghua <gi...@git.apache.org> on 2018/05/18 06:39:33 UTC

[GitHub] flink pull request #6041: [FLINK-9326] TaskManagerOptions.NUM_TASK_SLOTS doe...

GitHub user yanghua opened a pull request:

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

    [FLINK-9326] TaskManagerOptions.NUM_TASK_SLOTS does not work for local/embedded mode

    ## What is the purpose of the change
    
    *This pull request fixed the num slot config value override error.*
    
    ## Brief change log
    
      - *fixed the num slot config value override error.*
    
    ## Verifying this change
    
    This change is already covered by existing tests*.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (yes / **no**)
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
      - The serializers: (yes / **no** / don't know)
      - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
      - The S3 file system connector: (yes / **no** / don't know)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (yes / **no**)
      - If yes, how is the feature documented? (not applicable / docs / JavaDocs / **not documented**)


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

    $ git pull https://github.com/yanghua/flink FLINK-9326

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

    https://github.com/apache/flink/pull/6041.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 #6041
    
----
commit 16fb81beaa4983a04e9929267ced36a3121f8188
Author: yanghua <ya...@...>
Date:   2018-05-18T06:36:19Z

    [FLINK-9326] TaskManagerOptions.NUM_TASK_SLOTS does not work for local/embedded mode

----


---

[GitHub] flink pull request #6041: [FLINK-9326] TaskManagerOptions.NUM_TASK_SLOTS doe...

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

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


---

[GitHub] flink issue #6041: [FLINK-9326] TaskManagerOptions.NUM_TASK_SLOTS does not w...

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

    https://github.com/apache/flink/pull/6041
  
    cc @tillrohrmann 


---

[GitHub] flink pull request #6041: [FLINK-9326] TaskManagerOptions.NUM_TASK_SLOTS doe...

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

    https://github.com/apache/flink/pull/6041#discussion_r189836110
  
    --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/LocalStreamEnvironment.java ---
    @@ -103,9 +103,16 @@ public JobExecutionResult execute(String jobName) throws Exception {
     			configuration.setInteger(RestOptions.PORT, 0);
     		}
     
    +		int numSlotsPerTaskManager;
    +		if (configuration.contains(TaskManagerOptions.NUM_TASK_SLOTS)) {
    --- End diff --
    
    this block can be simplified to:
    ```
    numSlotsPerTaskManager = configuration.getInteger(TaskManagerOptions.NUM_TASK_SLOTS, jobGraph.getMaximumParallelism());
    ```


---

[GitHub] flink issue #6041: [FLINK-9326] TaskManagerOptions.NUM_TASK_SLOTS does not w...

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

    https://github.com/apache/flink/pull/6041
  
    cc @zentol @tzulitai if you have time, please review this PR, thanks~


---

[GitHub] flink pull request #6041: [FLINK-9326] TaskManagerOptions.NUM_TASK_SLOTS doe...

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

    https://github.com/apache/flink/pull/6041#discussion_r190187802
  
    --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/LocalStreamEnvironment.java ---
    @@ -103,9 +103,16 @@ public JobExecutionResult execute(String jobName) throws Exception {
     			configuration.setInteger(RestOptions.PORT, 0);
     		}
     
    +		int numSlotsPerTaskManager;
    +		if (configuration.contains(TaskManagerOptions.NUM_TASK_SLOTS)) {
    --- End diff --
    
    cc @zentol


---

[GitHub] flink pull request #6041: [FLINK-9326] TaskManagerOptions.NUM_TASK_SLOTS doe...

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

    https://github.com/apache/flink/pull/6041#discussion_r189856924
  
    --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/LocalStreamEnvironment.java ---
    @@ -103,9 +103,16 @@ public JobExecutionResult execute(String jobName) throws Exception {
     			configuration.setInteger(RestOptions.PORT, 0);
     		}
     
    +		int numSlotsPerTaskManager;
    +		if (configuration.contains(TaskManagerOptions.NUM_TASK_SLOTS)) {
    --- End diff --
    
    @zentol does it need a new commit?


---