You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by fa...@apache.org on 2025/03/17 06:47:47 UTC

(flink) branch master updated: [FLINK-37438][refactor] Improve the createLocalEnvironment by reduce duplicate operation on Configuration (#26273)

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 <be...@163.com>
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));
     }
 
     /**