gyfora commented on code in PR #575:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/575#discussion_r1179349838
##########
flink-kubernetes-operator-autoscaler/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/metrics/ScalingMetrics.java:
##########
@@ -83,6 +83,8 @@ public static void computeDataRateMetrics(
scalingMetrics.put(ScalingMetric.CURRENT_PROCESSING_RATE,
numRecordsInPerSecond);
} else {
LOG.error("Cannot compute true processing rate without
numRecordsInPerSecond");
+ scalingMetrics.put(ScalingMetric.TRUE_PROCESSING_RATE, Double.NaN);
+ scalingMetrics.put(ScalingMetric.CURRENT_PROCESSING_RATE,
Double.NaN);
Review Comment:
I was testing the error scenarios and realized that if some metrics were
missing from during collection, the scaling evaluator threw a nullpointer
exception. This is to put nan instead of just not putting anything
--
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]