Skip to content

Commit e4fe75d

Browse files
author
huyuanfeng
committed
Modify some description information and comments
1 parent 9419df9 commit e4fe75d

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

docs/layouts/shortcodes/generated/auto_scaler_configuration.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
<td><h5>job.autoscaler.scaling.key-group.partitions.adjust.mode</h5></td>
193193
<td style="word-wrap: break-word;">DEFAULT</td>
194194
<td><p>Enum</p></td>
195-
<td>How to adjust the parallelism of Source vertex or upstream shuffle is keyBy<br /><br />Possible values:<ul><li>"DEFAULT": This mode ensures that the parallelism adjustment attempts to evenly distribute data across subtasks. It is particularly effective for source vertices that are aware of partition counts or vertices after 'keyBy' operation. The goal is to have the number of key groups or partitions be divisible by the set parallelism, ensuring even data distribution and reducing data skew.</li><li>"MAXIMIZE_UTILISATION": This model is to maximize resource utilization. In this mode, an attempt is made to set the minimum degree of parallelism that meets the current consumption rate requirements. Unlike the default mode, it is not enforced that the number of key groups or partitions is divisible by the degree of parallelism.</li></ul></td>
195+
<td>How to adjust the parallelism of Source vertex or upstream shuffle is keyBy<br /><br />Possible values:<ul><li>"DEFAULT": This mode ensures that the parallelism adjustment attempts to evenly distribute data across subtasks. It is particularly effective for source vertices that are aware of partition counts or vertices after 'keyBy' operation. The goal is to have the number of key groups or partitions be divisible by the set parallelism, ensuring even data distribution and reducing data skew.</li><li>"MAXIMIZE_UTILISATION": This model is to maximize resource utilization. In this mode, an attempt is made to set the minimum parallelism that meets the current consumption rate requirements. Unlike the default mode, it is not enforced that the number of key groups or partitions is divisible by the degree of parallelism.</li></ul></td>
196196
</tr>
197197
<tr>
198198
<td><h5>job.autoscaler.stabilization.interval</h5></td>

flink-autoscaler/src/main/java/org/apache/flink/autoscaler/JobVertexScaler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ private boolean detectIneffectiveScaleUp(
355355
* maxParallelism).
356356
*
357357
* <p>Also, if we know the number of partitions or key groups corresponding to the current
358-
* vertex, the degree of parallelism will be adjusted accordingly. For specific logic, please
359-
* refer to {@link ParallelismAdjuster}.
358+
* vertex, the parallelism will be adjusted accordingly. For specific logic, please refer to
359+
* {@link ParallelismAdjuster}.
360360
*/
361361
@VisibleForTesting
362362
protected static <KEY, Context extends JobAutoScalerContext<KEY>> int scale(

flink-autoscaler/src/main/java/org/apache/flink/autoscaler/ParallelismAdjuster.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static <KEY, Context extends JobAutoScalerContext<KEY>> int adjust(
8383
}
8484

8585
// When adjusting the parallelism after rounding up cannot
86-
// find the right degree of parallelism to meet requirements,
86+
// find the right parallelism to meet requirements,
8787
// Try to find the smallest parallelism that can satisfy the current consumption rate.
8888
int p =
8989
calculateMinimumParallelism(
@@ -124,14 +124,14 @@ private static int calculateMinimumParallelism(
124124

125125
/** The mode of the key group or parallelism adjustment. */
126126
public enum KeyGroupOrPartitionsAdjustMode implements DescribedEnum {
127-
DEFAULT(
127+
ABSOLUTELY_EVENLY_DISTRIBUTION(
128128
"This mode ensures that the parallelism adjustment attempts to evenly distribute data across subtasks"
129129
+ ". It is particularly effective for source vertices that are aware of partition counts or vertices after "
130130
+ "'keyBy' operation. The goal is to have the number of key groups or partitions be divisible by the set parallelism, ensuring even data distribution and reducing data skew."),
131131

132132
MAXIMIZE_UTILISATION(
133133
"This model is to maximize resource utilization. In this mode, an attempt is made to set"
134-
+ " the minimum degree of parallelism that meets the current consumption rate requirements. Unlike the default mode, it is not enforced that the number of key groups or partitions is divisible by the degree of parallelism."),
134+
+ " the parallelism that meets the current consumption rate requirements. Unlike the default mode, it is not enforced that the number of key groups or partitions is divisible by the parallelism."),
135135
;
136136

137137
private final InlineElement description;

flink-autoscaler/src/main/java/org/apache/flink/autoscaler/config/AutoScalerOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ private static ConfigOptions.OptionBuilder autoScalerConfig(String key) {
358358
autoScalerConfig("scaling.key-group.partitions.adjust.mode")
359359
.enumType(ParallelismAdjuster.KeyGroupOrPartitionsAdjustMode.class)
360360
.defaultValue(
361-
ParallelismAdjuster.KeyGroupOrPartitionsAdjustMode.DEFAULT)
361+
ParallelismAdjuster.KeyGroupOrPartitionsAdjustMode
362+
.ABSOLUTELY_EVENLY_DISTRIBUTION)
362363
.withFallbackKeys(
363364
oldOperatorConfigKey(
364365
"scaling.key-group.partitions.adjust.mode"))

0 commit comments

Comments
 (0)