incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject svn commit: r1489684 - in /incubator/ambari/branches/branch-1.4.0/ambari-web: ./ app/mappers/service_mapper.js app/views/main/dashboard/service/yarn.js
Date Wed, 05 Jun 2013 01:50:42 GMT
Author: srimanth
Date: Wed Jun  5 01:50:42 2013
New Revision: 1489684

URL: http://svn.apache.org/r1489684
Log:
AMBARI-2227. Populate YARN service metrics in UI. (srimanth)

Modified:
    incubator/ambari/branches/branch-1.4.0/ambari-web/   (props changed)
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/service_mapper.js
    incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/yarn.js

Propchange: incubator/ambari/branches/branch-1.4.0/ambari-web/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jun  5 01:50:42 2013
@@ -0,0 +1,3 @@
+node_modules
+
+public

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/service_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/service_mapper.js?rev=1489684&r1=1489683&r2=1489684&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/service_mapper.js (original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/mappers/service_mapper.js Wed Jun
 5 01:50:42 2013
@@ -82,7 +82,25 @@ App.servicesMapper = App.QuickDataMapper
     version: 'resourceManagerComponent.ServiceComponentInfo.Version',
     resource_manager_node_id: 'resourceManagerComponent.host_components[0].HostRoles.host_name',
     node_manager_nodes: 'node_manager_nodes',
-    yarn_client_nodes: 'yarn_client_nodes'
+    node_manager_live_nodes: 'node_manager_live_nodes',
+    yarn_client_nodes: 'yarn_client_nodes',
+    //resource_manager_start_time: 'resourceManagerComponent.ServiceComponentInfo.StartTime',
+    //jvm_memory_heap_used: 'resourceManagerComponent.host_components[0].metrics.jvm.memHeapUsedM',
+    //jvm_memory_heap_committed: 'resourceManagerComponent.host_components[0].metrics.jvm.memHeapCommittedM',
+    containers_allocated: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.yarn.Queue.AllocatedContainers',
+    containers_pending: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.yarn.Queue.PendingContainers',
+    //containers_reserved: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.yarn.Queue.ReservedContainers',
+    apps_submitted: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.yarn.Queue.AppsSubmitted',
+    apps_running: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.yarn.Queue.AppsRunning',
+    apps_pending: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.yarn.Queue.AppsPending',
+    apps_completed: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.yarn.Queue.AppsCompleted',
+    //apps_killed: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.yarn.Queue.AppsKilled',
+    //apps_failed: 'resourceManagerComponent.ServiceComponentInfo.rm_metrics.yarn.Queue.AppsFailed',
+    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'
   },
   mapReduce2Config: {
     version: 'jobHistoryServerComponent.ServiceComponentInfo.Version',
@@ -305,6 +323,17 @@ App.servicesMapper = App.QuickDataMapper
     item.components.forEach(function (component) {
       if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name
== "RESOURCEMANAGER") {
         item.resourceManagerComponent = component;
+        //live nodes calculation
+        var nmList = App.parseJSON(component.ServiceComponentInfo.rm_metrics.cluster.nodeManagers)
+        nmList.forEach(function (nm) {
+          if (nm.State === "RUNNING") {
+            if (!item.node_manager_live_nodes) {
+              item.node_manager_live_nodes = [];
+            }
+            item.node_manager_live_nodes.push(nm.HostName);
+          }
+        });
+        // extend config
         finalConfig = jQuery.extend(finalConfig, yarnConfig);
       }
       if (component.ServiceComponentInfo && component.ServiceComponentInfo.component_name
== "NODEMANAGER") {

Modified: incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/yarn.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/yarn.js?rev=1489684&r1=1489683&r2=1489684&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/yarn.js
(original)
+++ incubator/ambari/branches/branch-1.4.0/ambari-web/app/views/main/dashboard/service/yarn.js
Wed Jun  5 01:50:42 2013
@@ -73,7 +73,7 @@ App.MainDashboardServiceYARNView = App.M
     var nodeManagers = this.get('service.nodeManagerNodes.length');
     var nodeManagersLive = this.get('service.nodeManagerLiveNodes.length');
     return this.t('dashboard.services.yarn.nodeManagers.live.msg').format(nodeManagersLive,
nodeManagers);
-  }.property('service.jvmMemoryHeapUsed', 'service.jvmMemoryHeapCommitted'),
+  }.property('service.nodeManagerNodes', 'service.nodeManagerLiveNodes'),
 
   nodeManagersStatus: function () {
     var nmActive = this.get('service.nodeManagersCountActive');



Mime
View raw message