فهرست منبع

AMBARI-6735. Once RM HA is config'd, none of the RM summary info or RM dashboard widgets show data. (akovalenko)

Aleksandr Kovalenko 10 سال پیش
والد
کامیت
28abde9c6a
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 9 0
      ambari-web/app/mappers/service_metrics_mapper.js

+ 9 - 0
ambari-web/app/mappers/service_metrics_mapper.js

@@ -486,6 +486,15 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
       if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name == "RESOURCEMANAGER") {
         item.resourceManagerComponent = component;
 
+        // if YARN has two host components, ACTIVE one should be first in component.host_components array for proper metrics mapping
+        if (component.host_components.length === 2) {
+          var activeRM = component.host_components.findProperty('HostRoles.ha_state', 'ACTIVE');
+          var standbyRM = component.host_components.findProperty('HostRoles.ha_state', 'STANDBY');
+          if (activeRM && standbyRM) {
+            component.host_components = [activeRM, standbyRM];
+          }
+        }
+
         if (component.host_components[0].metrics && component.host_components[0].metrics.yarn) {
           var root = component.host_components[0].metrics.yarn.Queue.root;
           component.queue = JSON.stringify({