ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject git commit: AMBARI-4012. NameNode max heap is not showing in HDP 1.3.2 stack. (xiwang via yusaku)
Date Mon, 09 Dec 2013 08:09:45 GMT
Updated Branches:
  refs/heads/branch-1.4.2 28a8c9af7 -> 7fe1dd91e


AMBARI-4012. NameNode max heap is not showing in HDP 1.3.2 stack. (xiwang via yusaku)

Conflicts:
	ambari-web/app/mappers/service_metrics_mapper.js


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

Branch: refs/heads/branch-1.4.2
Commit: 7fe1dd91e438ea0032579e7adaea19394aa0ba1c
Parents: 28a8c9a
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Mon Dec 9 00:07:42 2013 -0800
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Mon Dec 9 00:10:58 2013 -0800

----------------------------------------------------------------------
 ambari-web/app/controllers/global/update_controller.js       | 3 ++-
 ambari-web/app/views/main/dashboard/service/hdfs.js          | 6 +++---
 ambari-web/app/views/main/dashboard/service/yarn.js          | 7 +++----
 .../app/views/main/dashboard/widgets/jobtracker_heap.js      | 8 ++++++++
 ambari-web/app/views/main/dashboard/widgets/namenode_heap.js | 8 ++++++++
 .../app/views/main/dashboard/widgets/pie_chart_widget.js     | 4 ++--
 .../views/main/dashboard/widgets/resource_manager_heap.js    | 8 ++++++++
 7 files changed, 34 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7fe1dd91/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 1358627..dd553bd 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -146,7 +146,8 @@ App.UpdateController = Em.Controller.extend({
       'host_components/HostRoles/state,' +
       'host_components/HostRoles/stale_configs,' +
       'host_components/metrics/jvm/memHeapUsedM,' +
-      'host_components/metrics/jvm/memMaxM,' +
+      'host_components/metrics/jvm/HeapMemoryMax,' +
+      'host_components/metrics/jvm/HeapMemoryUsed,' +
       'host_components/metrics/jvm/memHeapCommittedM,' +
       'host_components/metrics/mapred/jobtracker/trackers_decommissioned,' +
       'host_components/metrics/cpu/cpu_wio,' +

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fe1dd91/ambari-web/app/views/main/dashboard/service/hdfs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/service/hdfs.js b/ambari-web/app/views/main/dashboard/service/hdfs.js
index 91560d5..ec19434 100644
--- a/ambari-web/app/views/main/dashboard/service/hdfs.js
+++ b/ambari-web/app/views/main/dashboard/service/hdfs.js
@@ -138,9 +138,9 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
     var memMax = this.get('service').get('jvmMemoryHeapMax');
     var percent = memMax > 0 ? ((100 * memUsed) / memMax) : 0;
     return this.t('dashboard.services.hdfs.nodes.heapUsed').format(
-        numberUtils.bytesToSize(memUsed, 1, 'parseFloat', 1024 * 1024), 
-        numberUtils.bytesToSize(memMax, 1, 'parseFloat', 1024 * 1024),
-        percent.toFixed(1));
+      numberUtils.bytesToSize(memUsed, 1, 'parseFloat'),
+      numberUtils.bytesToSize(memMax, 1, 'parseFloat'),
+      percent.toFixed(1));
   }.property('service.jvmMemoryHeapUsed', 'service.jvmMemoryHeapMax'),
 
   summaryHeader: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fe1dd91/ambari-web/app/views/main/dashboard/service/yarn.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/service/yarn.js b/ambari-web/app/views/main/dashboard/service/yarn.js
index 26d67fd..73da6f5 100644
--- a/ambari-web/app/views/main/dashboard/service/yarn.js
+++ b/ambari-web/app/views/main/dashboard/service/yarn.js
@@ -28,10 +28,9 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
     var memMax = this.get('service').get('jvmMemoryHeapMax');
     var percent = memMax > 0 ? ((100 * memUsed) / memMax) : 0;
     return this.t('dashboard.services.hdfs.nodes.heapUsed').format(
-        numberUtils.bytesToSize(memUsed, 1, 'parseFloat', 1024 * 1024), 
-        numberUtils.bytesToSize(memMax, 1, 'parseFloat', 1024 * 1024),
-        percent.toFixed(1));
-
+      numberUtils.bytesToSize(memUsed, 1, 'parseFloat'),
+      numberUtils.bytesToSize(memMax, 1, 'parseFloat'),
+      percent.toFixed(1));
   }.property('service.jvmMemoryHeapUsed', 'service.jvmMemoryHeapMax'),
 
   summaryHeader: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fe1dd91/ambari-web/app/views/main/dashboard/widgets/jobtracker_heap.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/jobtracker_heap.js b/ambari-web/app/views/main/dashboard/widgets/jobtracker_heap.js
index 3ea297e..a8996be 100644
--- a/ambari-web/app/views/main/dashboard/widgets/jobtracker_heap.js
+++ b/ambari-web/app/views/main/dashboard/widgets/jobtracker_heap.js
@@ -30,6 +30,14 @@ App.JobTrackerHeapPieChartView = App.PieChartDashboardWidgetView.extend({
 
   widgetHtmlId: 'widget-jt-heap',
 
+  getUsed: function() {
+    return (this.get('model').get(this.get('modelFieldUsed')) / (1024 * 1024)) || 0;
+  },
+
+  getMax: function() {
+    return (this.get('model').get(this.get('modelFieldMax')) / (1024 * 1024)) || 0;
+  },
+
   didInsertElement: function() {
     this._super();
     this.calc();

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fe1dd91/ambari-web/app/views/main/dashboard/widgets/namenode_heap.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/namenode_heap.js b/ambari-web/app/views/main/dashboard/widgets/namenode_heap.js
index 941a6fb..692796f 100644
--- a/ambari-web/app/views/main/dashboard/widgets/namenode_heap.js
+++ b/ambari-web/app/views/main/dashboard/widgets/namenode_heap.js
@@ -29,6 +29,14 @@ App.NameNodeHeapPieChartView = App.PieChartDashboardWidgetView.extend({
   modelFieldUsed: 'jvmMemoryHeapUsed',
   widgetHtmlId: 'widget-nn-heap',
 
+  getUsed: function() {
+    return (this.get('model').get(this.get('modelFieldUsed')) / (1024 * 1024)) || 0;
+  },
+
+  getMax: function() {
+    return (this.get('model').get(this.get('modelFieldMax')) / (1024 * 1024)) || 0;
+  },
+
   didInsertElement: function() {
     this._super();
     this.calc();

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fe1dd91/ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js b/ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js
index c6e9d07..2ad9444 100644
--- a/ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js
+++ b/ambari-web/app/views/main/dashboard/widgets/pie_chart_widget.js
@@ -59,8 +59,8 @@ App.PieChartDashboardWidgetView = App.DashboardWidgetView.extend({
   },
 
   calcDataForPieChart: function() {
-    var used = this.get('model').get(this.get('modelFieldUsed'));
-    var total = this.get('model').get(this.get('modelFieldMax'));
+    var used = this.getUsed();
+    var total = this.getMax();
     var percent = total > 0 ? ((used)*100 / total).toFixed() : 0;
     var percent_precise = total > 0 ? ((used)*100 / total).toFixed(1) : 0;
     return [percent, percent_precise];

http://git-wip-us.apache.org/repos/asf/ambari/blob/7fe1dd91/ambari-web/app/views/main/dashboard/widgets/resource_manager_heap.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/dashboard/widgets/resource_manager_heap.js b/ambari-web/app/views/main/dashboard/widgets/resource_manager_heap.js
index 5910ffa..4b28671 100644
--- a/ambari-web/app/views/main/dashboard/widgets/resource_manager_heap.js
+++ b/ambari-web/app/views/main/dashboard/widgets/resource_manager_heap.js
@@ -29,6 +29,14 @@ App.ResourceManagerHeapPieChartView = App.PieChartDashboardWidgetView.extend({
   modelFieldUsed: 'jvmMemoryHeapUsed',
   widgetHtmlId: 'widget-rm-heap',
 
+  getUsed: function() {
+    return (this.get('model').get(this.get('modelFieldUsed')) / (1024 * 1024)) || 0;
+  },
+
+  getMax: function() {
+    return (this.get('model').get(this.get('modelFieldMax')) / (1024 * 1024)) || 0;
+  },
+
   didInsertElement: function() {
     this._super();
     this.calc();


Mime
View raw message