You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2014/08/04 19:38:35 UTC
git commit: AMBARI-6735. Once RM HA is config'd,
none of the RM summary info or RM dashboard widgets show data.
(akovalenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 5423110a3 -> 28abde9c6
AMBARI-6735. Once RM HA is config'd, none of the RM summary info or RM dashboard widgets show data. (akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/28abde9c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/28abde9c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/28abde9c
Branch: refs/heads/trunk
Commit: 28abde9c6a58a5eefa40828779f53392bda9583b
Parents: 5423110
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Mon Aug 4 20:35:47 2014 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Mon Aug 4 20:38:08 2014 +0300
----------------------------------------------------------------------
ambari-web/app/mappers/service_metrics_mapper.js | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/28abde9c/ambari-web/app/mappers/service_metrics_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_metrics_mapper.js b/ambari-web/app/mappers/service_metrics_mapper.js
index ac4e8af..bc2211e 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/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({