Github user aljoscha commented on the issue:
https://github.com/apache/flink/pull/3561
Thanks for reminding, @uce ð Already had this on my list.
The only code that reads the DEFAULT_PARALLELISM from the config should be
in this piece of code in `CliFrontend`:
https://github.com/apache/flink/blob/master/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java#L250.
Here, we should check whether the user directly specified a parallelism and if
not read the one from the config. From there the parameter is already passed to
`ClusterClient.run()` where a a `ContextEnvironmentFactory` is being created.
In `ContextEnvironmentFactory.createExecutionEnvironment()` we would thus have
this parallelism.
The question now is whether to keep the
`lastEnvCreated.setParallelism(defaultParallelism)` or pass the default
parallelism to the `ContextEnvironment` so that the
`StreamExecutionEnvironment` can pick it up from there in the constructor. The
problem with calling `env.setParallelism()` is that the default parallelism
will be "forgotten" if the user calls `env.setParallelism(PARALLELISM_DEFAULT)`
where `ExecutionConfig.PARALLELISM_DEFAULT == -1`. If we manually store the
default parallelism in an extra field we would keep it. This seems to be the
nicer solution.
---
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.
---