NicoK opened a new pull request #11446: [FLINK-16664][stream] fix wrong check for DataStreamSource#setParallelism() URL: https://github.com/apache/flink/pull/11446 ## What is the purpose of the change This fixes a regression in the DataStream API for being unable to call ``` DataStreamSource#setParallelism(-1) ``` which should set the cluster/job default. It was introduced by https://github.com/apache/flink/commit/4a5e8c083969cad215819ad6a3a0d2919e8c2d5e. @xintongsong actually, I'm also a bit unsure on some other things from that commit, like `OperatorValidationUtils#validateMaxParallelism(int, boolean)` using an upper bound of `Integer.MAX_VALUE` instead of `Transformation#UPPER_BOUND_MAX_PARALLELISM`. In the end, it is not too much of a problem since this is actually checked twice in `SingleOutputStreamOperator#setMaxParallelism`, once there and a second time in the transformation which uses the correct upper bound. In the end, that part was only copied from the old code which did not have an upper bound check there and therefore, I did not change this here either. When merging, please also apply to release-1.10 ## Brief change log - change `DataStreamSource#setParallelism()` to call `OperatorValidationUtils.validateParallelism` instead of `OperatorValidationUtils.validateMaxParallelism` ## Verifying this change This change is a trivial rework / code cleanup without any test coverage. ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): **no** - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: **no** - The serializers: **no** - The runtime per-record code paths (performance sensitive): **no** - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: **no** - The S3 file system connector: **no** ## Documentation - Does this pull request introduce a new feature? **no** - If yes, how is the feature documented? **not applicable**
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
