ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject ambari git commit: Revert "AMBARI-11821. With HBase master HA Ambari sometimes displays incorrect dashboard information. (jaimin)"
Date Thu, 11 Jun 2015 15:58:45 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 cba2415de -> 5b9d1a524


Revert "AMBARI-11821. With HBase master HA Ambari sometimes displays incorrect dashboard information.
(jaimin)"

This reverts commit 83ce96d760d653fd07eef286226ef1a387f7bfaa.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5b9d1a52
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5b9d1a52
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5b9d1a52

Branch: refs/heads/branch-2.1
Commit: 5b9d1a5245d8d98f9c7eb1afc6b3d26df938af85
Parents: cba2415
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Thu Jun 11 18:58:31 2015 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Thu Jun 11 18:58:31 2015 +0300

----------------------------------------------------------------------
 .../YARN/2.1.0.2.0/YARN_metrics.json            |  10 +-
 .../assets/data/metrics/HBASE/definition.json   |  15 ++
 .../app/controllers/global/update_controller.js |  23 +--
 .../app/mappers/service_metrics_mapper.js       | 150 +++++++++----------
 ambari-web/app/messages.js                      |   1 +
 ambari-web/app/models/service/hbase.js          |   2 +
 ambari-web/app/models/service/mapreduce2.js     |   1 +
 ambari-web/app/models/service/yarn.js           |   1 +
 .../global/update_controller_test.js            |  19 +--
 ambari-web/test/mappers/service_mapper_test.js  | 104 +++----------
 10 files changed, 137 insertions(+), 189 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9d1a52/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json
index 9ea1483..92c32d8 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json
@@ -1842,6 +1842,11 @@
               "pointInTime": true,
               "temporal": false
             },
+            "metrics/jvm/startTime": {
+              "metric": "java.lang:type=Runtime.StartTime",
+              "pointInTime": true,
+              "temporal": false
+            },
             "metrics/yarn/Queue/$1.replaceAll(\",q(\\d+)=\",\"/\").substring(1)/ActiveApplications":
{
               "metric": "Hadoop:service=ResourceManager,name=QueueMetrics(.+).ActiveApplications",
               "pointInTime": true,
@@ -2528,11 +2533,6 @@
               "pointInTime": true,
               "temporal": false
             },
-            "metrics/runtime/StartTime": {
-              "metric": "java.lang:type=Runtime.StartTime",
-              "pointInTime": true,
-              "temporal": false
-            },
             "metrics/jvm/memHeapCommittedM": {
               "metric": "Hadoop:service=ResourceManager,name=JvmMetrics.MemHeapCommittedM",
               "pointInTime": true,

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9d1a52/ambari-web/app/assets/data/metrics/HBASE/definition.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/metrics/HBASE/definition.json b/ambari-web/app/assets/data/metrics/HBASE/definition.json
index 6837f7a..3374f2d 100644
--- a/ambari-web/app/assets/data/metrics/HBASE/definition.json
+++ b/ambari-web/app/assets/data/metrics/HBASE/definition.json
@@ -3916,6 +3916,11 @@
                           "temporal" : false,
                           "name" : "hadoop:service=HBase,name=RPCStatistics.deleteTableNumOps"
                         },
+                        "ServiceComponentInfo/Revision" : {
+                          "pointInTime" : true,
+                          "temporal" : false,
+                          "name" : "hadoop:service=HBase,name=Info.revision"
+                        },
                         "metrics/rpc/splitRegionAvgTime" : {
                           "pointInTime" : true,
                           "temporal" : false,
@@ -4126,6 +4131,11 @@
                           "temporal" : false,
                           "name" : "hadoop:service=HBase,name=RPCStatistics.multiMinTime"
                         },
+                        "metrics/hbase/master/revision" : {
+                          "pointInTime" : true,
+                          "temporal" : false,
+                          "name" : "hadoop:service=HBase,name=Info.revision"
+                        },
                         "metrics/rpc/modifyColumnMaxTime" : {
                           "pointInTime" : true,
                           "temporal" : false,
@@ -7269,6 +7279,11 @@
                           "temporal" : false,
                           "name" : "hadoop:service=HBase,name=RPCStatistics.multiMinTime"
                         },
+                        "metrics/hbase/master/revision" : {
+                          "pointInTime" : true,
+                          "temporal" : false,
+                          "name" : "hadoop:service=HBase,name=Info.revision"
+                        },
                         "metrics/rpc/modifyColumnMaxTime" : {
                           "pointInTime" : true,
                           "temporal" : false,

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9d1a52/ambari-web/app/controllers/global/update_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js
index d03a53b..af7b69e 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -371,6 +371,10 @@ App.UpdateController = Em.Controller.extend({
       haComponents = App.get('isHaEnabled') ? 'ServiceComponentInfo/component_name=JOURNALNODE|ServiceComponentInfo/component_name=ZKFC|'
: '',
       realUrl = '/components/?' + flumeHandlerParam + atsHandlerParam + haComponents +
         'ServiceComponentInfo/category=MASTER&fields=' +
+        'ServiceComponentInfo/Version,' +
+        'ServiceComponentInfo/StartTime,' +
+        'ServiceComponentInfo/HeapMemoryUsed,' +
+        'ServiceComponentInfo/HeapMemoryMax,' +
         'ServiceComponentInfo/service_name,' +
         'host_components/HostRoles/host_name,' +
         'host_components/HostRoles/state,' +
@@ -417,16 +421,17 @@ App.UpdateController = Em.Controller.extend({
     var serviceSpecificParams = {
       'FLUME': "host_components/processes/HostComponentProcess",
       'YARN': "host_components/metrics/yarn/Queue," +
-        "host_components/metrics/yarn/ClusterMetrics/NumActiveNMs," +
-        "host_components/metrics/yarn/ClusterMetrics/NumLostNMs," +
-        "host_components/metrics/yarn/ClusterMetrics/NumUnhealthyNMs," +
-        "host_components/metrics/yarn/ClusterMetrics/NumRebootedNMs," +
-        "host_components/metrics/yarn/ClusterMetrics/NumDecommissionedNMs",
+        "ServiceComponentInfo/rm_metrics/cluster/activeNMcount," +
+        "ServiceComponentInfo/rm_metrics/cluster/lostNMcount," +
+        "ServiceComponentInfo/rm_metrics/cluster/unhealthyNMcount," +
+        "ServiceComponentInfo/rm_metrics/cluster/rebootedNMcount," +
+        "ServiceComponentInfo/rm_metrics/cluster/decommissionedNMcount",
       'HBASE': "host_components/metrics/hbase/master/IsActiveMaster," +
-        "host_components/metrics/hbase/master/MasterStartTime," +
-        "host_components/metrics/hbase/master/MasterActiveTime," +
-        "host_components/metrics/hbase/master/AverageLoad," +
-        "host_components/metrics/master/AssignmentManger/ritCount",
+        "ServiceComponentInfo/MasterStartTime," +
+        "ServiceComponentInfo/MasterActiveTime," +
+        "ServiceComponentInfo/AverageLoad," +
+        "ServiceComponentInfo/Revision," +
+        "ServiceComponentInfo/RegionsInTransition",
       'STORM': /^2.1/.test(App.get('currentStackVersionNumber')) ? 'metrics/api/cluster/summary'
: 'metrics/api/v1/cluster/summary,metrics/api/v1/topology/summary'
     };
     var services = App.cache['services'];

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9d1a52/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 1ce43df..9c39fc6 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/ambari-web/app/mappers/service_metrics_mapper.js
@@ -31,7 +31,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     passive_state: 'ServiceInfo.passive_state',
     critical_alerts_count: 'ServiceInfo.critical_alerts_count',
     $rand: Math.random(),
-    $alerts: [1, 2, 3],
+    $alerts: [ 1, 2, 3 ],
     host_components: 'host_components',
     tool_tip_content: 'tool_tip_content',
     installed_clients: 'installed_clients',
@@ -72,7 +72,8 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     nfs_gateways_total: 'nfs_gateways_total'
   },
   yarnConfig: {
-    resource_manager_start_time: 'resourceManagerComponent.host_components[0].metrics.runtime.StartTime',
+    version: 'resourceManagerComponent.ServiceComponentInfo.Version',
+    resource_manager_start_time: 'resourceManagerComponent.ServiceComponentInfo.StartTime',
     jvm_memory_heap_used: 'resourceManagerComponent.host_components[0].metrics.jvm.HeapMemoryUsed',
     jvm_memory_heap_max: 'resourceManagerComponent.host_components[0].metrics.jvm.HeapMemoryMax',
     containers_allocated: 'resourceManagerComponent.host_components[0].metrics.yarn.Queue.root.AllocatedContainers',
@@ -84,11 +85,11 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     apps_completed: 'resourceManagerComponent.host_components[0].metrics.yarn.Queue.root.AppsCompleted',
     apps_killed: 'resourceManagerComponent.host_components[0].metrics.yarn.Queue.root.AppsKilled',
     apps_failed: 'resourceManagerComponent.host_components[0].metrics.yarn.Queue.root.AppsFailed',
-    node_managers_count_active: 'resourceManagerComponent.host_components[0].metrics.yarn.ClusterMetrics.NumActiveNMs',
-    node_managers_count_lost: 'resourceManagerComponent.host_components[0].metrics.yarn.ClusterMetrics.NumLostNMs',
-    node_managers_count_unhealthy: 'resourceManagerComponent.host_components[0].metrics.yarn.ClusterMetrics.NumUnhealthyNMs',
-    node_managers_count_rebooted: 'resourceManagerComponent.host_components[0].metrics.yarn.ClusterMetrics.NumRebootedNMs',
-    node_managers_count_decommissioned: 'resourceManagerComponent.host_components[0].metrics.yarn.ClusterMetrics.NumDecommissionedNMs',
+    node_managers_count_active: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.cluster.activeNMcount',
+    node_managers_count_lost: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.cluster.lostNMcount',
+    node_managers_count_unhealthy: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.cluster.unhealthyNMcount',
+    node_managers_count_rebooted: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.cluster.rebootedNMcount',
+    node_managers_count_decommissioned: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.cluster.decommissionedNMcount',
     allocated_memory: 'resourceManagerComponent.host_components[0].metrics.yarn.Queue.root.AllocatedMB',
     available_memory: 'resourceManagerComponent.host_components[0].metrics.yarn.Queue.root.AvailableMB',
     reserved_memory: 'resourceManagerComponent.host_components[0].metrics.yarn.Queue.root.ReservedMB',
@@ -98,15 +99,18 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     node_managers_total: 'node_managers_total'
   },
   mapReduce2Config: {
+    version: 'jobHistoryServerComponent.ServiceComponentInfo.Version',
     map_reduce2_clients: 'map_reduce2_clients'
   },
   hbaseConfig: {
-    master_start_time: 'masterComponent.host_components[0].metrics.hbase.master.MasterStartTime',
-    master_active_time: 'masterComponent.host_components[0].metrics.hbase.master.MasterActiveTime',
-    average_load: 'masterComponent.host_components[0].metrics.hbase.master.AverageLoad',
-    heap_memory_used: 'masterComponent.host_components[0].metrics.jvm.HeapMemoryUsed',
-    heap_memory_max: 'masterComponent.host_components[0].metrics.jvm.HeapMemoryMax',
+    version: 'masterComponent.ServiceComponentInfo.Version',
+    master_start_time: 'masterComponent.ServiceComponentInfo.MasterStartTime',
+    master_active_time: 'masterComponent.ServiceComponentInfo.MasterActiveTime',
+    average_load: 'masterComponent.ServiceComponentInfo.AverageLoad',
     regions_in_transition: 'regions_in_transition',
+    revision: 'masterComponent.ServiceComponentInfo.Revision',
+    heap_memory_used: 'masterComponent.ServiceComponentInfo.HeapMemoryUsed',
+    heap_memory_max: 'masterComponent.ServiceComponentInfo.HeapMemoryMax',
     region_servers_started: 'region_servers_started',
     region_servers_installed: 'region_servers_installed',
     region_servers_total: 'region_servers_total',
@@ -143,7 +147,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
   config3: {
     id: 'id',
     work_status: 'HostRoles.state',
-    passive_state: 'HostRoles.maintenance_state',
+    passive_state:'HostRoles.maintenance_state',
     desired_status: 'HostRoles.desired_state',
     component_name: 'HostRoles.component_name',
     host_id: 'HostRoles.host_name',
@@ -169,11 +173,11 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
        * services contains constructed service-components structure from components array
        */
 
-      services.forEach(function (service) {
+      services.forEach(function(service) {
         service.host_components = [];
         service.components = [];
       });
-
+      
       json.items.forEach(function (component) {
         var serviceName = component.ServiceComponentInfo.service_name;
         var service = services.findProperty('ServiceInfo.service_name', serviceName);
@@ -262,23 +266,23 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
       //load services to model
       App.store.loadMany(this.get('model'), result);
       /*if (previousResponse.length !== result.length) {
-       App.store.loadMany(this.get('model'), result);
-       } else {
-       result.forEach(function (serviceJson) {
-       var fields = ['passive_state','work_status', 'rand', 'alerts', 'quick_links', 'host_components',
'tool_tip_content', 'critical_alerts_count'];
-       var service = this.get('model').find(serviceJson.id);
-       var modifiedData = this.getDiscrepancies(serviceJson, previousResponse.findProperty('id',
serviceJson.id), fields);
-       if (modifiedData.isLoadNeeded) {
-       App.store.load(this.get('model'), serviceJson);
-       } else {
-       for (var property in modifiedData) {
-       service.set(stringUtils.underScoreToCamelCase(property), modifiedData[property]);
-       }
-       }
-       }, this)
-       }
+        App.store.loadMany(this.get('model'), result);
+      } else {
+        result.forEach(function (serviceJson) {
+          var fields = ['passive_state','work_status', 'rand', 'alerts', 'quick_links', 'host_components',
'tool_tip_content', 'critical_alerts_count'];
+          var service = this.get('model').find(serviceJson.id);
+          var modifiedData = this.getDiscrepancies(serviceJson, previousResponse.findProperty('id',
serviceJson.id), fields);
+          if (modifiedData.isLoadNeeded) {
+            App.store.load(this.get('model'), serviceJson);
+          } else {
+            for (var property in modifiedData) {
+              service.set(stringUtils.underScoreToCamelCase(property), modifiedData[property]);
+            }
+          }
+        }, this)
+      }
 
-       previousResponse = result;*/
+      previousResponse = result;*/
     }
     console.timeEnd('App.serviceMetricsMapper execution time');
   },
@@ -294,7 +298,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     services.setEach('tool_tip_content', '');
     // set tooltip for client-only services
     var clientOnlyServiceNames = App.get('services.clientOnly');
-    clientOnlyServiceNames.forEach(function (serviceName) {
+    clientOnlyServiceNames.forEach(function(serviceName) {
       var service = services.findProperty('ServiceInfo.service_name', serviceName);
       if (service) {
         service.tool_tip_content = Em.I18n.t('services.service.summary.clientOnlyService.ToolTip');
@@ -353,8 +357,8 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
    * @param finalJson
    * @param item
    */
-  mapQuickLinks: function (finalJson, item) {
-    if (!(item && item.ServiceInfo)) return;
+  mapQuickLinks: function (finalJson, item){
+    if(!(item && item.ServiceInfo)) return;
     var quickLinks = {
       OOZIE: [19],
       GANGLIA: [20],
@@ -373,11 +377,10 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     var finalConfig = jQuery.extend({}, this.config);
     // Change the JSON so that it is easy to map
     var hdfsConfig = this.hdfsConfig;
-    var self = this;
     item.components.forEach(function (component) {
       if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name
== "NAMENODE") {
         //enabled HA
-        if (component.host_components.length == 2) {
+        if ( component.host_components.length == 2) {
           var haState1;
           var haState2;
           if (component.host_components[1].metrics && component.host_components[1].metrics.dfs)
{
@@ -421,8 +424,12 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
               item.standby_name_node2_id = 'NAMENODE' + '_' + standby_name_nodes[1];
               break;
           }
-          var activeHostComponentIndex = haState2 == "active" ? 1 : 0;
-          self.setActiveAsFirstHostComponent(component, activeHostComponentIndex);
+          // important: active nameNode always at host_components[0]; if no active, then
any nameNode could work.
+          if (haState2 == "active") { // change places for all model bind with host_component[0]
+            var tmp = component.host_components[1];
+            component.host_components[1] = component.host_components[0];
+            component.host_components[0] = tmp;
+          }
         }
         item.nameNodeComponent = component;
         finalConfig = jQuery.extend(finalConfig, hdfsConfig);
@@ -439,13 +446,13 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
         item.dead_data_nodes = [];
         item.live_data_nodes = [];
         for (var host in decommissionNodesJson) {
-          item.decommission_data_nodes.push('DATANODE' + '_' + host);
+          item.decommission_data_nodes.push('DATANODE'+ '_' + host);
         }
         for (var host in deadNodesJson) {
-          item.dead_data_nodes.push('DATANODE' + '_' + host);
+          item.dead_data_nodes.push('DATANODE'+ '_' + host);
         }
         for (var host in liveNodesJson) {
-          item.live_data_nodes.push('DATANODE' + '_' + host);
+          item.live_data_nodes.push('DATANODE'+ '_' + host);
         }
       }
       if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name
== "JOURNALNODE") {
@@ -465,7 +472,6 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
 
     return finalJson;
   },
-
   yarnMapper: function (item) {
     var result = [];
     var self = this;
@@ -479,8 +485,11 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
         // 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 activeHostComponentIndex = component.host_components.indexOf(activeRM);
-          self.setActiveAsFirstHostComponent(component, activeHostComponentIndex);
+          // if "second" RM isn't STARTED his ha_status is null (not STANDBY)
+          var standbyRM = component.host_components.filter(function(host_component) {return
host_component.HostRoles.ha_state !== 'ACTIVE';})[0];
+          if (activeRM && standbyRM) {
+            component.host_components = [activeRM, standbyRM];
+          }
         }
 
         if (component.host_components[0].metrics && component.host_components[0].metrics.yarn)
{
@@ -495,11 +504,11 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     });
     // Map
     var finalJson = this.parseIt(item, finalConfig);
-    finalJson.quick_links = [23, 24, 25, 26];
+    finalJson.quick_links = [ 23, 24, 25, 26 ];
     return finalJson;
   },
 
-  parseObject: function (obj) {
+  parseObject: function(obj) {
     var res = {};
     for (var p in obj) {
       if (obj.hasOwnProperty(p)) {
@@ -529,7 +538,6 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     return finalJson;
   },
   hbaseMapper: function (item) {
-    var self = this;
     // Change the JSON so that it is easy to map
     var finalConfig = jQuery.extend({}, this.config);
     var hbaseConfig = this.hbaseConfig;
@@ -537,17 +545,12 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
       if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name
== "HBASE_MASTER") {
         item.masterComponent = component;
         finalConfig = jQuery.extend(finalConfig, hbaseConfig);
-        if (component.host_components.length) {
-          var activeMaster = component.host_components.findProperty('metrics.hbase.master.IsActiveMaster',
'true');
-          var activeHostComponentIndex = component.host_components.indexOf(activeMaster);
-          self.setActiveAsFirstHostComponent(component, activeHostComponentIndex);
-          var regionsArray = App.parseJSON(component.host_components[0].metrics.master.AssignmentManger.ritCount);
-          //regions_in_transition can have various type of value: null, array or int
-          if (Array.isArray(regionsArray)) {
-            item.regions_in_transition = regionsArray.length;
-          } else {
-            item.regions_in_transition = regionsArray == null ? 0 : regionsArray;
-          }
+        var regionsArray = App.parseJSON(component.ServiceComponentInfo.RegionsInTransition);
+        //regions_in_transition can have various type of value: null, array or int
+        if (Array.isArray(regionsArray)) {
+          item.regions_in_transition = regionsArray.length;
+        } else {
+          item.regions_in_transition = regionsArray == null ? 0 : regionsArray;
         }
       }
     });
@@ -557,22 +560,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     finalJson.quick_links = [13, 14, 15, 16, 17, 18];
     return finalJson;
   },
-
-  /**
-   * Sets the active host component as the first host component
-   * @param component {Object}
-   * @param activeHostComponentIndex {Number}
-   */
-  setActiveAsFirstHostComponent: function (component, activeHostComponentIndex) {
-    // important: active component always at host_components[0];
-    if (activeHostComponentIndex && activeHostComponentIndex !== -1) {
-      var tmp = component.host_components[activeHostComponentIndex];
-      component.host_components[activeHostComponentIndex] = component.host_components[0];
-      component.host_components[0] = tmp;
-    }
-  }
-  ,
-
+  
   /**
    * Flume is different from other services, in that the important
    * data is in customizable channels. Hence we directly transfer
@@ -588,9 +576,9 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     flumeHandlers = flumeHandlers ? flumeHandlers.host_components : [];
     finalJson.agents = [];
     finalJson.agentJsons = [];
-    flumeHandlers.forEach(function (flumeHandler) {
+    flumeHandlers.forEach(function(flumeHandler){
       var hostName = flumeHandler.HostRoles.host_name;
-      flumeHandler.processes.forEach(function (process) {
+      flumeHandler.processes.forEach(function(process){
         var agentJson = self.parseIt(process, self.flumeAgentConfig);
         var agentId = agentJson.name + "-" + hostName;
         finalJson.agents.push(agentId);
@@ -599,13 +587,12 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
       });
     });
     return finalJson;
-  }
-  ,
+  },
 
   /**
    * Storm mapper
    */
-  stormMapper: function (item) {
+  stormMapper: function(item) {
     var finalConfig = jQuery.extend({}, this.config);
     var stormConfig = this.stormConfig;
     var metricsInfoComponent = /^2.1/.test(App.get('currentStackVersionNumber')) ? 'STORM_REST_API'
: 'STORM_UI_SERVER';
@@ -614,7 +601,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
       STORM_UI_SERVER: 'metrics.api.v1.cluster.summary'
     }[metricsInfoComponent];
 
-    item.components.forEach(function (component) {
+    item.components.forEach(function(component) {
       if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name
== metricsInfoComponent) {
         if (Em.get(component, metricsPath)) {
           item.restApiComponent = App.keysDottedToCamelCase(Em.get(component, metricsPath));
@@ -629,5 +616,4 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
     });
     return this.parseIt(item, finalConfig);
   }
-})
-;
+});

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9d1a52/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 99305a8..88c716d 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2474,6 +2474,7 @@ Em.I18n.translations = {
   'dashboard.services.hbase.phoenixServers':'Phoenix Query Servers',
   'dashboard.services.hbase.phoenixServersSummary':'{0} live / {1} total',
   'dashboard.services.hbase.chart.label':'Request Count',
+  'dashboard.services.hbase.version':'Version',
   'dashboard.services.hbase.masterWebUI':'Master Web UI',
   'dashboard.services.hbase.regions.transition':'Regions In Transition',
   'dashboard.services.hbase.masterStarted':'Master Started',

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9d1a52/ambari-web/app/models/service/hbase.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service/hbase.js b/ambari-web/app/models/service/hbase.js
index 5b39771..662577f 100644
--- a/ambari-web/app/models/service/hbase.js
+++ b/ambari-web/app/models/service/hbase.js
@@ -18,6 +18,7 @@
 var App = require('app');
 
 App.HBaseService = App.Service.extend({
+  version: DS.attr('string'),
   master: function () {
     return this.get('hostComponents').findProperty('componentName', 'HBASE_MASTER');
   }.property('hostComponents'),
@@ -31,6 +32,7 @@ App.HBaseService = App.Service.extend({
   masterActiveTime: DS.attr('number'),
   averageLoad: DS.attr('number'),
   regionsInTransition: DS.attr('number'),
+  revision: DS.attr('string'),
   heapMemoryUsed: DS.attr('number'),
   heapMemoryMax: DS.attr('number')
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9d1a52/ambari-web/app/models/service/mapreduce2.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service/mapreduce2.js b/ambari-web/app/models/service/mapreduce2.js
index ad343e1..388b236 100644
--- a/ambari-web/app/models/service/mapreduce2.js
+++ b/ambari-web/app/models/service/mapreduce2.js
@@ -18,6 +18,7 @@
 var App = require('app');
 
 App.MapReduce2Service = App.Service.extend({
+  version: DS.attr('string'),
   jobHistoryServer: function () {
     return this.get('hostComponents').findProperty('componentName', 'HISTORYSERVER');
   }.property('hostComponents'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9d1a52/ambari-web/app/models/service/yarn.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service/yarn.js b/ambari-web/app/models/service/yarn.js
index 3534b4e..eb33886 100644
--- a/ambari-web/app/models/service/yarn.js
+++ b/ambari-web/app/models/service/yarn.js
@@ -19,6 +19,7 @@ var App = require('app');
 var objectUtils = require('utils/object_utils');
 
 App.YARNService = App.Service.extend({
+  version: DS.attr('string'),
   resourceManager: function() {
     return this.get('hostComponents').findProperty('componentName', 'RESOURCEMANAGER');
   }.property('hostComponents'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9d1a52/ambari-web/test/controllers/global/update_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/global/update_controller_test.js b/ambari-web/test/controllers/global/update_controller_test.js
index 87be07b..f55136b 100644
--- a/ambari-web/test/controllers/global/update_controller_test.js
+++ b/ambari-web/test/controllers/global/update_controller_test.js
@@ -147,11 +147,11 @@ describe('App.UpdateController', function () {
           }
         ],
         result: ["host_components/metrics/yarn/Queue," +
-        "host_components/metrics/yarn/ClusterMetrics/NumActiveNMs," +
-        "host_components/metrics/yarn/ClusterMetrics/NumLostNMs," +
-        "host_components/metrics/yarn/ClusterMetrics/NumUnhealthyNMs," +
-        "host_components/metrics/yarn/ClusterMetrics/NumRebootedNMs," +
-        "host_components/metrics/yarn/ClusterMetrics/NumDecommissionedNMs"]
+          "ServiceComponentInfo/rm_metrics/cluster/activeNMcount," +
+          "ServiceComponentInfo/rm_metrics/cluster/lostNMcount," +
+          "ServiceComponentInfo/rm_metrics/cluster/unhealthyNMcount," +
+          "ServiceComponentInfo/rm_metrics/cluster/rebootedNMcount," +
+          "ServiceComponentInfo/rm_metrics/cluster/decommissionedNMcount"]
       },
       {
         title: 'HBASE service',
@@ -163,10 +163,11 @@ describe('App.UpdateController', function () {
           }
         ],
         result: ["host_components/metrics/hbase/master/IsActiveMaster," +
-        "host_components/metrics/hbase/master/MasterStartTime," +
-        "host_components/metrics/hbase/master/MasterActiveTime," +
-        "host_components/metrics/hbase/master/AverageLoad," +
-        "host_components/metrics/master/AssignmentManger/ritCount"]
+          "ServiceComponentInfo/MasterStartTime," +
+          "ServiceComponentInfo/MasterActiveTime," +
+          "ServiceComponentInfo/AverageLoad," +
+          "ServiceComponentInfo/Revision," +
+          "ServiceComponentInfo/RegionsInTransition"]
       },
       {
         title: 'STORM service',

http://git-wip-us.apache.org/repos/asf/ambari/blob/5b9d1a52/ambari-web/test/mappers/service_mapper_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mappers/service_mapper_test.js b/ambari-web/test/mappers/service_mapper_test.js
index 3545c03..1ab4cf9 100644
--- a/ambari-web/test/mappers/service_mapper_test.js
+++ b/ambari-web/test/mappers/service_mapper_test.js
@@ -32,112 +32,48 @@ describe('App.serviceMetricsMapper', function () {
         {
           components: [
             {
-              ServiceComponentInfo: {
-                component_name: "HBASE_MASTER",
-                RegionsInTransition : [ ]
-              },
-              host_components: [
-                {
-                  metrics:{
-                    hbase: {
-                      master: {
-                        IsActiveMaster: 'true',
-                        AverageLoad: 1.23456789
-                      }
-                    },
-                    master: {
-                      AssignmentManger: {
-                        ritCount: 0
-                      }
-                    }
-                  }
+                ServiceComponentInfo: {
+                  AverageLoad: 1.23456789,
+                  component_name: "HBASE_MASTER",
+                  RegionsInTransition : [ ]
                 }
-              ]
-            }
+              }
           ],
           e: '1.23'
         },
         {
           components: [
             {
-              ServiceComponentInfo: {
-                component_name: "HBASE_MASTER",
-                RegionsInTransition : [ ]
-              },
-              host_components: [
-                {
-                  metrics:{
-                    hbase: {
-                      master: {
-                        IsActiveMaster: 'true',
-                        AverageLoad: 1.00
-                      }
-                    },
-                    master: {
-                      AssignmentManger: {
-                        ritCount: 0
-                      }
-                    }
-                  }
+                ServiceComponentInfo: {
+                  AverageLoad: 1.00,
+                  component_name: "HBASE_MASTER",
+                  RegionsInTransition : [ ]
                 }
-              ]
-            }
+              }
           ],
           e: '1.00'
         },
         {
           components: [
             {
-              ServiceComponentInfo: {
-                component_name: "HBASE_MASTER",
-                RegionsInTransition : [ ]
-              },
-              host_components: [
-                {
-                  metrics:{
-                    hbase: {
-                      master: {
-                        IsActiveMaster: 'true',
-                        AverageLoad: 1
-                      }
-                    },
-                    master: {
-                      AssignmentManger: {
-                        ritCount: 0
-                      }
-                    }
-                  }
+                ServiceComponentInfo: {
+                  AverageLoad: 1,
+                  component_name: "HBASE_MASTER",
+                  RegionsInTransition : [ ]
                 }
-              ]
-            }
+              }
           ],
           e: '1.00'
         },
         {
           components: [
             {
-              ServiceComponentInfo: {
-                component_name: "HBASE_MASTER",
-                RegionsInTransition : [ ]
-              },
-              host_components: [
-                {
-                  metrics:{
-                    hbase: {
-                      master: {
-                        IsActiveMaster: 'true',
-                        AverageLoad: 1.2
-                      }
-                    },
-                    master: {
-                      AssignmentManger: {
-                        ritCount: 0
-                      }
-                    }
-                  }
+                ServiceComponentInfo: {
+                  AverageLoad: 1.2,
+                  component_name: "HBASE_MASTER",
+                  RegionsInTransition : [ ]
                 }
-              ]
-            }
+              }
           ],
           e: '1.20'
         }


Mime
View raw message