This is an automated email from the ASF dual-hosted git repository.

fanrui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 452b648495f [FLINK-37438][refactor] Improve the createLocalEnvironment 
by reduce duplicate operation on Configuration (#26273)
452b648495f is described below

commit 452b648495f26fbb3d69d43f68ab7c8af8ec8494
Author: Jiaan Geng <[email protected]>
AuthorDate: Mon Mar 17 14:47:41 2025 +0800

    [FLINK-37438][refactor] Improve the createLocalEnvironment by reduce 
duplicate operation on Configuration (#26273)
---
 .../flink/streaming/api/environment/StreamExecutionEnvironment.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
 
b/flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
index 55d4bef793a..44733abab54 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
@@ -2218,7 +2218,8 @@ public class StreamExecutionEnvironment implements 
AutoCloseable {
      * @return A local execution environment with the specified parallelism.
      */
     public static LocalStreamEnvironment createLocalEnvironment(int 
parallelism) {
-        return createLocalEnvironment(parallelism, new Configuration());
+        return createLocalEnvironment(
+                new Configuration().set(CoreOptions.DEFAULT_PARALLELISM, 
parallelism));
     }
 
     /**

Reply via email to