You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by GitBox <gi...@apache.org> on 2020/11/24 15:28:45 UTC

[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

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