You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/08/08 20:29:14 UTC

git commit: AMBARI-2841. Hadoop2 stack shows n/a values for YARN cluster memory. (onechiporenko via yusaku)

Updated Branches:
  refs/heads/trunk e81d705b7 -> 84ea23232


AMBARI-2841. Hadoop2 stack shows n/a values for YARN cluster memory. (onechiporenko via yusaku)


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

Branch: refs/heads/trunk
Commit: 84ea23232b0b12548284e9e7ec0b046328493a6c
Parents: e81d705
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Thu Aug 8 11:29:05 2013 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Thu Aug 8 11:29:05 2013 -0700

----------------------------------------------------------------------
 ambari-web/app/mappers/service_mapper.js                   | 6 +++---
 ambari-web/app/models/service/yarn.js                      | 6 ++----
 ambari-web/app/views/main/dashboard/widgets/yarn_memory.js | 4 ++--
 3 files changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/84ea2323/ambari-web/app/mappers/service_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_mapper.js b/ambari-web/app/mappers/service_mapper.js
index dffc38d..5ffa096 100644
--- a/ambari-web/app/mappers/service_mapper.js
+++ b/ambari-web/app/mappers/service_mapper.js
@@ -104,8 +104,8 @@ App.servicesMapper = App.QuickDataMapper.create({
     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',
-    yarn_memory_allocated: 'resourceManagerComponent.host_components[0].metrics.yarn.Queue.root.AllocatedMB',
-    yarn_memory_available: 'resourceManagerComponent.host_components[0].metrics.yarn.Queue.root.AvailableMB',
+    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',
     queue: 'resourceManagerComponent.queue'
   },
@@ -393,7 +393,7 @@ App.servicesMapper = App.QuickDataMapper.create({
           }
         });
 
-        if (component.host_components[0].metrics.yarn) {
+        if (component.host_components[0].metrics && component.host_components[0].metrics.yarn) {
           var root = component.host_components[0].metrics.yarn.Queue.root;
           var queue = JSON.stringify({
             'root': self.parseObject(root)

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/84ea2323/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 43e6f65..1eab2bb 100644
--- a/ambari-web/app/models/service/yarn.js
+++ b/ambari-web/app/models/service/yarn.js
@@ -41,9 +41,9 @@ App.YARNService = App.Service.extend({
   resourceManagerStartTime: DS.attr('number'),
   jvmMemoryHeapUsed: DS.attr('number'),
   jvmMemoryHeapCommitted: DS.attr('number'),
-  //allocatedMemory: DS.attr('number'),
+  allocatedMemory: DS.attr('number'),
   reservedMemory: DS.attr('number'),
-  //availableMemory: DS.attr('number'),
+  availableMemory: DS.attr('number'),
   queue: DS.attr('string'),
   queueFormatted: function() {
     var queue = JSON.parse(this.get('queue'));
@@ -53,8 +53,6 @@ App.YARNService = App.Service.extend({
     var queue = JSON.parse(this.get('queue'));
     return objectUtils.recursiveKeysCount(queue);
   }.property('queue'),
-  yarnMemoryAllocated: DS.attr('number'),
-  yarnMemoryAvailable: DS.attr('number'),
   /** 
    * Provides a flat array of queue names.
    * Example: root, root/default

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/84ea2323/ambari-web/app/views/main/dashboard/widgets/yarn_memory.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/yarn_memory.js b/ambari-web/app/views/main/dashboard/widgets/yarn_memory.js
index e422abb..92d12f3 100644
--- a/ambari-web/app/views/main/dashboard/widgets/yarn_memory.js
+++ b/ambari-web/app/views/main/dashboard/widgets/yarn_memory.js
@@ -28,8 +28,8 @@ App.YARNMemoryPieChartView = App.PieChartDashboardWidgetView.extend({
 
   model_type: 'yarn',
 
-  modelFieldUsed: 'yarnMemoryAllocated',
-  modelFieldMax: 'yarnMemoryAvailable',
+  modelFieldUsed: 'allocatedMemory',
+  modelFieldMax: 'availableMemory',
 
   didInsertElement: function() {
     this._super();