ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [ambari] akiyamaneko commented on a change in pull request #3243: [Ambari 25570] Fix HDFS Namenode page in grafana had some rpc metrics always show 'No datapoints' .
Date Wed, 14 Oct 2020 11:46:36 GMT

akiyamaneko commented on a change in pull request #3243:

File path: ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
@@ -273,7 +273,7 @@ define([
             var metricTransform = !target.transform || target.transform === "none" ? '' :
'._' + target.transform;
             var seriesAggregator = !target.seriesAggregator || target.seriesAggregator ===
"none" ? '' : '&seriesAggregateFunction=' + target.seriesAggregator;
-            var templatedComponent = (_.isEmpty(tComponent)) ? : tComponent;
+            var templatedComponent = (_.isEmpty( ? tComponent :;

Review comment:
       @payert  thanks for your review.
   1. the metrics I changed are not new metrics, they have been added in metrics_whitelist,
please look at: [metrics_whitelist#529](
   2. In Grafana HDFS NameNode Page, The backend query url will be like this:
   **The parameter appid in query URL is namenode, but the missing metrics must be queried
 from `appid=datanode`.**
   appId is obtained from templatedComponent´╝îas the history code `var templatedComponent
= (_.isEmpty(tComponent)) ? : tComponent;` ,   `tComponent` is a global variable
and it will never be empty, so the value of appId is always 'namenode'.  
   Therefore I change the way to init templatedComponent to ensure the templatedComponent
use the first. 
   Although I have checked other metrics and no problem had been found so far. I am also worried
that my modification to `datasource.js` will affect other metrics.  Do you have any Suggestions?

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:

View raw message