Github user kl0u commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3616#discussion_r108943809
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/transformations/StreamTransformation.java
 ---
    @@ -221,10 +232,19 @@ public int getMaxParallelism() {
         * @param maxParallelism Maximum parallelism for this stream 
transformation.
         */
        public void setMaxParallelism(int maxParallelism) {
    -           Preconditions.checkArgument(maxParallelism > 0
    -                                           && maxParallelism <= 
StreamGraphGenerator.UPPER_BOUND_MAX_PARALLELISM,
    -                           "Maximum parallelism must be between 1 and " + 
StreamGraphGenerator.UPPER_BOUND_MAX_PARALLELISM
    -                                           + ". Found: " + maxParallelism);
    +           checkArgument(
    +                           parallelism != 
ExecutionConfig.PARALLELISM_DEFAULT,
    +                           "A maximum parallelism can only be specified 
with an explicitly specified " +
    +                                           "parallelism.");
    +           checkArgument(maxParallelism > 0, "The maximum parallelism must 
be greater than 0.");
    +           checkArgument(
    +                           maxParallelism >= parallelism,
    +                           "The maximum parallelism must be larger than 
the parallelism. (parallelism = " +
    +                                           parallelism + " max-parallelism 
= " + maxParallelism);
    --- End diff --
    
    Missing closing ")" at the end of the error message.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to