gyfora commented on code in PR #617:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/617#discussion_r1223955225
##########
flink-kubernetes-operator-autoscaler/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/JobAutoScalerImpl.java:
##########
@@ -102,10 +108,8 @@ public boolean scale(FlinkResourceContext<? extends
AbstractFlinkResource<?, ?>>
resource, autoScalerInfo, ctx.getFlinkService(),
conf);
LOG.debug("Evaluating scaling metrics for {}", collectedMetrics);
- var evaluatedMetrics = evaluator.evaluate(conf, collectedMetrics);
+ evaluatedMetrics = evaluator.evaluate(conf, collectedMetrics);
LOG.debug("Scaling metrics evaluated: {}", evaluatedMetrics);
- lastEvaluatedMetrics.put(resourceId, evaluatedMetrics);
- flinkMetrics.registerScalingMetrics(() ->
lastEvaluatedMetrics.get(resourceId));
if (!collectedMetrics.isFullyCollected()) {
// We have done an upfront evaluation, but we are not ready
for scaling.
Review Comment:
I think we should somehow null out the RECOMMENDED_PARALLELISM (or set it to
Double.nan) if the metrics are not fully collected because at that point we are
not actually recommending anything. It would be then consistent of not
reporting the values when the job is not running / still stabilizing.
--
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]