ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ambari] hapylestat commented on a change in pull request #3262: [AMBARI-25587] Metrics cannot be stored and the exception message is null when metric value is NaN
Date Tue, 24 Nov 2020 15:28:45 GMT

hapylestat commented on a change in pull request #3262:
URL: https://github.com/apache/ambari/pull/3262#discussion_r529635537



##########
File path: ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/aggregators/AggregatorUtils.java
##########
@@ -50,6 +50,11 @@
       for (Double value : metricValues.values()) {
         // TODO: Some nulls in data - need to investigate null values from host
         if (value != null) {
+          // As the null values does not participate in the sum of current metric, NaN is
handled similarly.

Review comment:
       why to add new `if` condition if all could be combined in to one like: `if (value !=
null && !value.isNaN()) {`




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message