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.


---

Reply via email to