Skip to content

Commit 452b648

Browse files
authored
[FLINK-37438][refactor] Improve the createLocalEnvironment by reduce duplicate operation on Configuration (#26273)
1 parent 3891fe8 commit 452b648

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flink-runtime/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,8 @@ public static LocalStreamEnvironment createLocalEnvironment() {
22182218
* @return A local execution environment with the specified parallelism.
22192219
*/
22202220
public static LocalStreamEnvironment createLocalEnvironment(int parallelism) {
2221-
return createLocalEnvironment(parallelism, new Configuration());
2221+
return createLocalEnvironment(
2222+
new Configuration().set(CoreOptions.DEFAULT_PARALLELISM, parallelism));
22222223
}
22232224

22242225
/**

0 commit comments

Comments
 (0)