Github user kl0u commented on a diff in the pull request:
https://github.com/apache/flink/pull/3616#discussion_r108943516
--- Diff:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/transformations/StreamTransformation.java
---
@@ -202,7 +203,17 @@ public int getParallelism() {
* @param parallelism The new parallelism to set on this {@code
StreamTransformation}
*/
public void setParallelism(int parallelism) {
- Preconditions.checkArgument(parallelism > 0, "Parallelism must
be bigger than zero.");
+ checkArgument(parallelism !=
ExecutionConfig.PARALLELISM_UNKNOWN, "Cannot specify UNKNOWN_PARALLELISM.");
--- End diff --
The `PARALLELISM_UNKNOWN` does not seem to be used anywhere in the
codebase, apart from checking against it. Couldn't we remove it? Or am I
missing something?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---