mxm commented on code in PR #729:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/729#discussion_r1423833917
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/controller/FlinkResourceContext.java:
##########
@@ -65,7 +66,9 @@ public KubernetesJobAutoScalerContext
getJobAutoScalerContext() {
}
private KubernetesJobAutoScalerContext createJobAutoScalerContext() {
- Configuration conf = new Configuration(getObserveConfig());
+ Configuration conf =
+ new KeyMigratingConfiguration(
+ AutoScalerOptions.LEGACY_CONF_PREFIX,
getObserveConfig());
Review Comment:
Semantically, there is no difference. The reason I chose the subclass is
that I didn't want to touch any other configs apart from the deprecated
options. `Configuration` doesn't allow to access the configuration map
directly. One has to extract the configuration as string which will runs
through a conversion process.
I just did a quick conversion of the code (see latest commit). I don't
prefer this approach but let me know if you find the code more readable.
##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/config/AutoScalerOptions.java:
##########
@@ -46,107 +45,93 @@ private static ConfigOptions.OptionBuilder
autoScalerConfig(String key) {
autoScalerConfig("enabled")
.booleanType()
.defaultValue(false)
- .withFallbackKeys(oldOperatorConfigKey("enabled"))
Review Comment:
The core idea of this fix is to remove deprecated/fallback keys because they
generate WARN messages in the logs for every key and every reconciliation loop.
The keys are deprecated in the sense that they are not documented anymore but
we can't remove them, at least not until much later.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]