1996fanrui commented on code in PR #921: URL: https://github.com/apache/flink-kubernetes-operator/pull/921#discussion_r1870706024
########## flink-autoscaler/src/main/java/org/apache/flink/autoscaler/config/AutoScalerOptions.java: ########## @@ -89,21 +89,35 @@ private static ConfigOptions.OptionBuilder autoScalerConfig(String key) { + "seconds suffix, daily expression's formation is startTime-endTime, such as 9:30:30-10:50:20, when exclude from 9:30:30-10:50:20 in Monday and Thursday " + "we can express it as 9:30:30-10:50:20 && * * * ? * 2,5"); - public static final ConfigOption<Double> TARGET_UTILIZATION = - autoScalerConfig("target.utilization") + public static final ConfigOption<Double> UTILIZATION_TARGET = + autoScalerConfig("utilization.target") .doubleType() .defaultValue(0.7) .withFallbackKeys(oldOperatorConfigKey("target.utilization")) Review Comment: The new option key is ` job.autoscaler.utilization.target`, but it should be compatible with the following options: - job.autoscaler.target.utilization (Deprecated key) - kubernetes.operator.job.autoscaler.target.utilization (fallback key) - kubernetes.operator.job.autoscaler.utilization.target (fallback key) ########## flink-autoscaler/src/main/java/org/apache/flink/autoscaler/config/AutoScalerOptions.java: ########## @@ -89,21 +89,35 @@ private static ConfigOptions.OptionBuilder autoScalerConfig(String key) { + "seconds suffix, daily expression's formation is startTime-endTime, such as 9:30:30-10:50:20, when exclude from 9:30:30-10:50:20 in Monday and Thursday " + "we can express it as 9:30:30-10:50:20 && * * * ? * 2,5"); - public static final ConfigOption<Double> TARGET_UTILIZATION = - autoScalerConfig("target.utilization") + public static final ConfigOption<Double> UTILIZATION_TARGET = + autoScalerConfig("utilization.target") .doubleType() .defaultValue(0.7) .withFallbackKeys(oldOperatorConfigKey("target.utilization")) .withDescription("Target vertex utilization"); - public static final ConfigOption<Double> TARGET_UTILIZATION_BOUNDARY = - autoScalerConfig("target.utilization.boundary") + public static final ConfigOption<Double> UTILIZATION_TARGET_BOUNDARY = + autoScalerConfig("utilization.target.boundary") .doubleType() .defaultValue(0.3) .withFallbackKeys(oldOperatorConfigKey("target.utilization.boundary")) .withDescription( "Target vertex utilization boundary. Scaling won't be performed if the processing capacity is within [target_rate / (target_utilization - boundary), (target_rate / (target_utilization + boundary)]"); + public static final ConfigOption<Double> TARGET_UTILIZATION_MAX = + autoScalerConfig("utilization.target.max") + .doubleType() + .defaultValue(-1d) + .withFallbackKeys(oldOperatorConfigKey("utilization.target.max")) + .withDescription("Max vertex utilization"); + + public static final ConfigOption<Double> TARGET_UTILIZATION_MIN = + autoScalerConfig("utilization.target.min") + .doubleType() + .defaultValue(-1d) Review Comment: IIUC, if we don't update the default value, it should be 0.4d. ########## flink-autoscaler/src/main/java/org/apache/flink/autoscaler/config/AutoScalerOptions.java: ########## @@ -89,21 +89,35 @@ private static ConfigOptions.OptionBuilder autoScalerConfig(String key) { + "seconds suffix, daily expression's formation is startTime-endTime, such as 9:30:30-10:50:20, when exclude from 9:30:30-10:50:20 in Monday and Thursday " + "we can express it as 9:30:30-10:50:20 && * * * ? * 2,5"); - public static final ConfigOption<Double> TARGET_UTILIZATION = - autoScalerConfig("target.utilization") + public static final ConfigOption<Double> UTILIZATION_TARGET = + autoScalerConfig("utilization.target") .doubleType() .defaultValue(0.7) .withFallbackKeys(oldOperatorConfigKey("target.utilization")) .withDescription("Target vertex utilization"); - public static final ConfigOption<Double> TARGET_UTILIZATION_BOUNDARY = - autoScalerConfig("target.utilization.boundary") + public static final ConfigOption<Double> UTILIZATION_TARGET_BOUNDARY = + autoScalerConfig("utilization.target.boundary") .doubleType() .defaultValue(0.3) .withFallbackKeys(oldOperatorConfigKey("target.utilization.boundary")) .withDescription( "Target vertex utilization boundary. Scaling won't be performed if the processing capacity is within [target_rate / (target_utilization - boundary), (target_rate / (target_utilization + boundary)]"); + public static final ConfigOption<Double> TARGET_UTILIZATION_MAX = + autoScalerConfig("utilization.target.max") + .doubleType() + .defaultValue(-1d) Review Comment: IIUC, if we don't update the default value, it should be 1.0d. ########## flink-autoscaler/src/main/java/org/apache/flink/autoscaler/config/AutoScalerOptions.java: ########## @@ -89,21 +89,35 @@ private static ConfigOptions.OptionBuilder autoScalerConfig(String key) { + "seconds suffix, daily expression's formation is startTime-endTime, such as 9:30:30-10:50:20, when exclude from 9:30:30-10:50:20 in Monday and Thursday " + "we can express it as 9:30:30-10:50:20 && * * * ? * 2,5"); - public static final ConfigOption<Double> TARGET_UTILIZATION = - autoScalerConfig("target.utilization") + public static final ConfigOption<Double> UTILIZATION_TARGET = + autoScalerConfig("utilization.target") .doubleType() .defaultValue(0.7) .withFallbackKeys(oldOperatorConfigKey("target.utilization")) .withDescription("Target vertex utilization"); - public static final ConfigOption<Double> TARGET_UTILIZATION_BOUNDARY = - autoScalerConfig("target.utilization.boundary") + public static final ConfigOption<Double> UTILIZATION_TARGET_BOUNDARY = + autoScalerConfig("utilization.target.boundary") .doubleType() .defaultValue(0.3) .withFallbackKeys(oldOperatorConfigKey("target.utilization.boundary")) .withDescription( "Target vertex utilization boundary. Scaling won't be performed if the processing capacity is within [target_rate / (target_utilization - boundary), (target_rate / (target_utilization + boundary)]"); Review Comment: As we discussed in FLINK-36836, we only need the following 3 options: ``` job.autoscaler.utilization.target job.autoscaler.utilization.min job.autoscaler.utilization.max ``` So `target.utilization.boundary` should be deprecated in this PR. But we need to ensure the backward compatibility. For example, if `job.autoscaler.utilization.min` or `job.autoscaler.utilization.max` are not set, and `job.autoscaler.target.utilization.boundary` is set, we could use the `job.autoscaler.target.utilization.boundary`. ########## flink-autoscaler/src/main/java/org/apache/flink/autoscaler/config/AutoScalerOptions.java: ########## @@ -89,21 +89,35 @@ private static ConfigOptions.OptionBuilder autoScalerConfig(String key) { + "seconds suffix, daily expression's formation is startTime-endTime, such as 9:30:30-10:50:20, when exclude from 9:30:30-10:50:20 in Monday and Thursday " + "we can express it as 9:30:30-10:50:20 && * * * ? * 2,5"); - public static final ConfigOption<Double> TARGET_UTILIZATION = - autoScalerConfig("target.utilization") + public static final ConfigOption<Double> UTILIZATION_TARGET = + autoScalerConfig("utilization.target") .doubleType() .defaultValue(0.7) .withFallbackKeys(oldOperatorConfigKey("target.utilization")) .withDescription("Target vertex utilization"); - public static final ConfigOption<Double> TARGET_UTILIZATION_BOUNDARY = - autoScalerConfig("target.utilization.boundary") + public static final ConfigOption<Double> UTILIZATION_TARGET_BOUNDARY = + autoScalerConfig("utilization.target.boundary") .doubleType() .defaultValue(0.3) .withFallbackKeys(oldOperatorConfigKey("target.utilization.boundary")) .withDescription( "Target vertex utilization boundary. Scaling won't be performed if the processing capacity is within [target_rate / (target_utilization - boundary), (target_rate / (target_utilization + boundary)]"); + public static final ConfigOption<Double> TARGET_UTILIZATION_MAX = + autoScalerConfig("utilization.target.max") Review Comment: ```suggestion autoScalerConfig("utilization.max") ``` `job.autoscaler.utilization.max` is the option key we discussed in FLINK-36836. ########## flink-autoscaler/src/main/java/org/apache/flink/autoscaler/config/AutoScalerOptions.java: ########## @@ -89,21 +89,35 @@ private static ConfigOptions.OptionBuilder autoScalerConfig(String key) { + "seconds suffix, daily expression's formation is startTime-endTime, such as 9:30:30-10:50:20, when exclude from 9:30:30-10:50:20 in Monday and Thursday " + "we can express it as 9:30:30-10:50:20 && * * * ? * 2,5"); - public static final ConfigOption<Double> TARGET_UTILIZATION = - autoScalerConfig("target.utilization") + public static final ConfigOption<Double> UTILIZATION_TARGET = + autoScalerConfig("utilization.target") .doubleType() .defaultValue(0.7) .withFallbackKeys(oldOperatorConfigKey("target.utilization")) .withDescription("Target vertex utilization"); - public static final ConfigOption<Double> TARGET_UTILIZATION_BOUNDARY = - autoScalerConfig("target.utilization.boundary") + public static final ConfigOption<Double> UTILIZATION_TARGET_BOUNDARY = + autoScalerConfig("utilization.target.boundary") .doubleType() .defaultValue(0.3) .withFallbackKeys(oldOperatorConfigKey("target.utilization.boundary")) .withDescription( "Target vertex utilization boundary. Scaling won't be performed if the processing capacity is within [target_rate / (target_utilization - boundary), (target_rate / (target_utilization + boundary)]"); + public static final ConfigOption<Double> TARGET_UTILIZATION_MAX = + autoScalerConfig("utilization.target.max") + .doubleType() + .defaultValue(-1d) + .withFallbackKeys(oldOperatorConfigKey("utilization.target.max")) + .withDescription("Max vertex utilization"); + + public static final ConfigOption<Double> TARGET_UTILIZATION_MIN = + autoScalerConfig("utilization.target.min") Review Comment: ```suggestion autoScalerConfig("utilization.min") ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org