[
https://issues.apache.org/jira/browse/FLINK-8257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16298303#comment-16298303
]
ASF GitHub Bot commented on FLINK-8257:
---------------------------------------
GitHub user xccui opened a pull request:
https://github.com/apache/flink/pull/5192
[FLINK-8257] [conf] Unify the value checks for setParallelism()
## What is the purpose of the change
This PR unifies the value checks for `setParallelism()` methods in
different components.
## Brief change log
#### flink-java:
Updates the error message in
`org.apache.flink.api.java.operators.Operator.setParallelism()`.
#### flink-streaming-java:
Refines the check in `StreamTransformation.setParallelism()`.
Changes the value check to `parallelism != 1` in
`DataStreamSource.setParallelism()`.
Removes the value checks in `SingleOutputStreamOperator.setParallelism()`
and `StreamExecutionEnvironment.setParallelism()`.
#### flink-gelly:
Updates the error messages for `setParallelism()` methods in
`GraphAnalyticBase`, `IterationConfiguration` and `GraphAlgorithmWrappingBase`.
The methods in flink-runtime package were kept unchanged.
Since `org.apache.flink.api.common.operators.Operator.setParallelism()` is
only used internally, no extra check was provided for it.
## Verifying this change
This change is already covered by existing tests
## 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, 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)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/xccui/flink FLINK-8257
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5192.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5192
----
commit 44681d1a06373c5e9e723bd202ee053aaf95b3e8
Author: Xingcan Cui <xingcanc@...>
Date: 2017-12-20T09:11:12Z
[FLINK-8257] [conf] Unify the value checks for setParallelism()
----
> Unify the value checks for setParallelism()
> -------------------------------------------
>
> Key: FLINK-8257
> URL: https://issues.apache.org/jira/browse/FLINK-8257
> Project: Flink
> Issue Type: Improvement
> Components: Configuration
> Reporter: Xingcan Cui
> Assignee: Xingcan Cui
>
> The {{setParallelism()}} method exist in many components from different
> levels. Some of the methods require the input value to be greater than {{1}}
> (e.g., {{StreamTransformation.setParallelism()}}), while some of them also
> allow the value to be {{ExecutionConfig.PARALLELISM_DEFAULT}}, which is
> {{-1}} by default (e.g., {{DataSink.setParallelism()}}). We need to unify the
> value checks for these methods.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)