mxm commented on code in PR #546:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/546#discussion_r1129285777
##########
flink-kubernetes-operator-autoscaler/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/metrics/MetricAggregator.java:
##########
@@ -34,7 +33,11 @@ public enum MetricAggregator {
this.getter = getter;
}
- public Optional<Double> get(AggregatedMetric metric) {
- return Optional.ofNullable(metric).map(getter).filter(d -> !d.isNaN());
+ public double get(AggregatedMetric metric) {
+ if (metric != null) {
+ return getter.apply(metric);
+ } else {
+ return Double.NaN;
+ }
Review Comment:
We discussed that this may delay decisions in case of NaNs but should not
cause issues.
--
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]