1996fanrui commented on code in PR #26273:
URL: https://github.com/apache/flink/pull/26273#discussion_r1992668237


##########
flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java:
##########
@@ -2218,7 +2218,9 @@ public static LocalStreamEnvironment 
createLocalEnvironment() {
      * @return A local execution environment with the specified parallelism.
      */
     public static LocalStreamEnvironment createLocalEnvironment(int 
parallelism) {
-        return createLocalEnvironment(parallelism, new Configuration());
+        Configuration configuration = new Configuration();
+        configuration.set(CoreOptions.DEFAULT_PARALLELISM, parallelism);
+        return createLocalEnvironment(configuration);

Review Comment:
   > Does Flink have any coding style preferences for this style?
   
   I didn't see the strict style preference for this case. I like @davidradl 's 
suggestion because we could avoid one temporary variable.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to