Skip to content

Commit 25a7216

Browse files
committed
[FLINK-37440] Fix the bug that parallelism.default do not always adopts 1 as the default value.
1 parent 7fa4f78 commit 25a7216

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

flink-clients/src/test/java/org/apache/flink/client/program/ClientTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,6 @@ public boolean isCompatibleWith(@Nonnull Configuration configuration) {
495495
@Override
496496
public PipelineExecutor getExecutor(@Nonnull Configuration configuration) {
497497
return (pipeline, config, classLoader) -> {
498-
final int parallelism = config.get(CoreOptions.DEFAULT_PARALLELISM);
499498
final JobGraph jobGraph = streamGraph.getJobGraph();
500499
// The job graphs from different cases are generated from the same stream
501500
// graph, resulting in the same job ID, which can lead to exceptions.

flink-core/src/main/java/org/apache/flink/configuration/CoreOptions.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,8 @@ public static String[] mergeListsToArray(List<String> base, List<String> append)
459459
ConfigOptions.key("parallelism.default")
460460
.intType()
461461
.defaultValue(1)
462-
.withDescription("Default parallelism for jobs.");
462+
.withDescription(
463+
"Default parallelism for jobs. There are two special case. The first case is when creating a StreamExecutioneEnvironment, if the value of parallelism.default is not explicitly specified, the number of processors available to the Java virtual machine will be used as the default parallelism. The second case is when creating mini cluster, the number of slots will be used as the default parallelism");
463464

464465
// ------------------------------------------------------------------------
465466
// file systems

0 commit comments

Comments
 (0)