You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/02/03 14:53:44 UTC

[40/50] [abbrv] ambari git commit: AMBARI-19828. UI changes to resolve discrepancies between what the stack vs Ambari reports as "live" for NodeManagers. (Vivek Subramanian via yusaku)

AMBARI-19828. UI changes to resolve discrepancies between what the stack vs Ambari reports as "live" for NodeManagers. (Vivek Subramanian via yusaku)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 69c8389ef8d76e8a7a41a8a796f51be044033026
Parents: 9c1b153
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Thu Feb 2 10:36:48 2017 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Thu Feb 2 10:36:48 2017 -0800

----------------------------------------------------------------------
 ambari-web/app/messages.js                             | 13 ++++++++++++-
 ambari-web/app/views/main/service/services/hdfs.js     | 10 ++++++----
 ambari-web/app/views/main/service/services/yarn.js     |  2 +-
 .../test/views/main/service/services/hdfs_test.js      |  6 ++++--
 .../test/views/main/service/services/yarn_test.js      |  2 +-
 5 files changed, 24 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/69c8389e/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 9644edb..6f8f435 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2930,7 +2930,18 @@ Em.I18n.translations = {
   'dashboard.services.yarn.resourceManager.standby':'Standby ResourceManager',
   'dashboard.services.resourceManager.nodes.heap':'ResourceManager Heap',
   'dashboard.services.yarn.nodeManagers.status': 'NodeManagers Status',
-  'dashboard.services.yarn.nodeManagers.status.msg': '{0} active / {1} lost / {2} unhealthy / {3} rebooted / {4} decommissioned',
+  'dashboard.services.yarn.nodeManagers.status.active': 'active',
+  'dashboard.services.yarn.nodeManagers.status.lost': 'lost',
+  'dashboard.services.yarn.nodeManagers.status.unhealthy': 'unhealthy',
+  'dashboard.services.yarn.nodeManagers.status.rebooted': 'rebooted',
+  'dashboard.services.yarn.nodeManagers.status.decommissioned': 'decommissioned',
+  'dashboard.services.yarn.nodeManagers.status.tooltip.active': 'This is the number of NodeManagers that are active as reported from the ResourceManager',
+  'dashboard.services.yarn.nodeManagers.status.tooltip.lost': 'This is the number of NodeManagers that are lost as reported from the ResourceManager. ' +
+    'Even if a NodeManager process is up, the ResourceManager might see the status as lost if the NodeManager is not communicating with the ' +
+    'ResourceManager as expected. This can be due to situations such as a network issue or a hanging NodeManager process due to excessive garbage collection.',
+  'dashboard.services.yarn.nodeManagers.status.tooltip.unhealthy': 'This is the number of NodeManagers that are unhealthy as reported from the ResourceManager.',
+  'dashboard.services.yarn.nodeManagers.status.tooltip.rebooted': 'This is the number of NodeManagers that are in the rebooted state as reported from the ResourceManager.',
+  'dashboard.services.yarn.nodeManagers.status.tooltip.decommissioned': 'This is the number of NodeManagers that are decommissioned as reported from the ResourceManager.',
   'dashboard.services.yarn.containers': 'Containers',
   'dashboard.services.yarn.containers.msg': '{0} allocated / {1} pending / {2} reserved',
   'dashboard.services.yarn.apps': 'Applications',

http://git-wip-us.apache.org/repos/asf/ambari/blob/69c8389e/ambari-web/app/views/main/service/services/hdfs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/hdfs.js b/ambari-web/app/views/main/service/services/hdfs.js
index 40fb761..f85e095 100644
--- a/ambari-web/app/views/main/service/services/hdfs.js
+++ b/ambari-web/app/views/main/service/services/hdfs.js
@@ -74,10 +74,12 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({
       $('[rel=healthTooltip]').tooltip('destroy')
     }
   }),
-
-  didInsertElement: function() {
-    App.tooltip($("[rel='tooltip']"));
-  },
+  
+  metricsNotAvailableObserver: function () {
+    if(!this.get("service.metricsNotAvailable")) {
+      App.tooltip($("[rel='tooltip']"));
+    }
+  }.observes("service.metricsNotAvailable"),
 
   willDestroyElement: function() {
     $("[rel='tooltip']").tooltip('destroy');

http://git-wip-us.apache.org/repos/asf/ambari/blob/69c8389e/ambari-web/app/views/main/service/services/yarn.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/services/yarn.js b/ambari-web/app/views/main/service/services/yarn.js
index cf8adeb..84ba520 100644
--- a/ambari-web/app/views/main/service/services/yarn.js
+++ b/ambari-web/app/views/main/service/services/yarn.js
@@ -55,7 +55,6 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
   _nmUnhealthy: Em.computed.formatUnavailable('service.nodeManagersCountUnhealthy'),
   _nmRebooted: Em.computed.formatUnavailable('service.nodeManagersCountRebooted'),
   _nmDecom: Em.computed.formatUnavailable('service.nodeManagersCountDecommissioned'),
-  nodeManagersStatus: Em.computed.i18nFormat('dashboard.services.yarn.nodeManagers.status.msg', '_nmActive', '_nmLost', '_nmUnhealthy', '_nmRebooted', '_nmDecom'),
 
   _allocated: Em.computed.formatUnavailable('service.containersAllocated'),
   _pending: Em.computed.formatUnavailable('service.containersPending'),
@@ -82,6 +81,7 @@ App.MainDashboardServiceYARNView = App.MainDashboardServiceView.extend({
 
   didInsertElement: function(){
     App.tooltip($("[rel='queue-tooltip']"), {html: true, placement: "right"});
+    App.tooltip($("[rel='tooltip']"));
   },
 
   willDestroyElement: function(){

http://git-wip-us.apache.org/repos/asf/ambari/blob/69c8389e/ambari-web/test/views/main/service/services/hdfs_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/service/services/hdfs_test.js b/ambari-web/test/views/main/service/services/hdfs_test.js
index 06d0e01..efa0e3b 100644
--- a/ambari-web/test/views/main/service/services/hdfs_test.js
+++ b/ambari-web/test/views/main/service/services/hdfs_test.js
@@ -124,7 +124,7 @@ describe('App.MainDashboardServiceHdfsView', function () {
     });
   });
 
-  describe("#didInsertElement()", function() {
+  describe("#metricsNotAvailableObserver()", function() {
 
     beforeEach(function() {
       sinon.stub(App, 'tooltip');
@@ -134,7 +134,9 @@ describe('App.MainDashboardServiceHdfsView', function () {
     });
 
     it("App.tooltip should be called", function() {
-      view.didInsertElement();
+      view.set("service", Em.Object.create({
+        metricsNotAvailable: false
+      }));
       expect(App.tooltip.calledOnce).to.be.true;
     });
   });

http://git-wip-us.apache.org/repos/asf/ambari/blob/69c8389e/ambari-web/test/views/main/service/services/yarn_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/service/services/yarn_test.js b/ambari-web/test/views/main/service/services/yarn_test.js
index 9c1cf7a..57b3b05 100644
--- a/ambari-web/test/views/main/service/services/yarn_test.js
+++ b/ambari-web/test/views/main/service/services/yarn_test.js
@@ -127,7 +127,7 @@ describe('App.MainDashboardServiceYARNView', function () {
 
     it("App.tooltip should be called", function() {
       view.didInsertElement();
-      expect(App.tooltip.calledOnce).to.be.true;
+      expect(App.tooltip.calledTwice).to.be.true;
     });
   });