[ https://issues.apache.org/jira/browse/FLINK-9326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483716#comment-16483716 ]
ASF GitHub Bot commented on FLINK-9326: --------------------------------------- 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()); ``` > TaskManagerOptions.NUM_TASK_SLOTS does not work for local/embedded mode > ----------------------------------------------------------------------- > > Key: FLINK-9326 > URL: https://issues.apache.org/jira/browse/FLINK-9326 > Project: Flink > Issue Type: Bug > Components: Core > Affects Versions: 1.5.0 > Environment: Linux 64bit > Flink branch release-1.5 > Reporter: Samuel Doyle > Assignee: vinoyang > Priority: Major > > When attempting to set the number of task slots via the api such ash > {code:java} > configuration = new Configuration(); > configuration.setInteger(TaskManagerOptions.NUM_TASK_SLOTS, 16); > configuration.setInteger(CoreOptions.DEFAULT_PARALLELISM, 1); > {code} > I will always end up with the default slot setting based on the number of > cores I have where my standalone instance is running, it doesn't matter what > I set the the NUM_TASK_SLOTS to, it has no effect -- This message was sent by Atlassian JIRA (v7.6.3#76005)