[
https://issues.apache.org/jira/browse/FLINK-9040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16429761#comment-16429761
]
ASF GitHub Bot commented on FLINK-9040:
---------------------------------------
Github user sihuazhou commented on the issue:
https://github.com/apache/flink/pull/5825
I only fix the javadoc for `JobVertex#setMaxParallelism()`, because if we
validate `maxParallism` in that function we will break some current code, and
I'am not sure whether these code also need to be changed, e.g:
If the user didn't set the `maxParallelism` for `Transformation`, than the
default value is -1, and in `StreamJobGraphGenerator#createJobVertex` we use
the following code to set the `maxParallelism` for `jobVertex`
```java
jobVertex.setMaxParallelism(streamNode.getMaxParallelism());
```
also, in the constructor of `ExecutionJobVertex`, we use the following code
to get the default `maxParallelism` value and the `VALUE_NOT_SET` is `-1`.
```java
final int configuredMaxParallelism = jobVertex.getMaxParallelism();
this.maxParallelismConfigured = (VALUE_NOT_SET !=
configuredMaxParallelism);
```
@zentol What do you think? if you still think we should validate
`maxParallism` in `JobVertex#setMaxParallelism()` please let me know.
> JobVertex#setMaxParallelism does not validate argument
> ------------------------------------------------------
>
> Key: FLINK-9040
> URL: https://issues.apache.org/jira/browse/FLINK-9040
> Project: Flink
> Issue Type: Bug
> Components: Local Runtime
> Affects Versions: 1.5.0
> Reporter: Chesnay Schepler
> Assignee: Sihua Zhou
> Priority: Minor
>
> {code}
> /**
> * Sets the maximum parallelism for the task.
> *
> * @param maxParallelism The maximum parallelism to be set. must be between 1
> and Short.MAX_VALUE.
> */
> public void setMaxParallelism(int maxParallelism) {
> this.maxParallelism = maxParallelism;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)