dawidwys commented on a change in pull request #13944:
URL: https://github.com/apache/flink/pull/13944#discussion_r518665924



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/LocalStreamEnvironment.java
##########
@@ -66,6 +66,9 @@ private static Configuration 
validateAndGetConfiguration(final Configuration con
                final Configuration effectiveConfiguration = new 
Configuration(checkNotNull(configuration));
                effectiveConfiguration.set(DeploymentOptions.TARGET, "local");
                effectiveConfiguration.set(DeploymentOptions.ATTACHED, true);
+               if 
(!configuration.getOptional(CoreOptions.DEFAULT_PARALLELISM).isPresent()) {

Review comment:
       I did it to keep the behaviour of the `LocalStreamEnvironment` class. It 
says:
   
   ```
   <p>When this environment is instantiated, it uses a default parallelism of 
{@code 1}. The default parallelism can be set via {@link #setParallelism(int)}.
   ```
   and it was explicitly calling `setParallelism(1)` irrespective of the 
`DEFAULT_PARALLELISM.defaultValue()`.
   
   If you think its fine to just use the `DEFAULT_PARALLELISM.defaultValue()`, 
which is `1` btw, I can remove all the mingling with parallelism in here.




----------------------------------------------------------------
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]


Reply via email to