ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiw...@apache.org
Subject ambari git commit: AMBARI-14030. Datanode shows up prematurely as 'Decomissioned' in Ambari UI while it is 'Decomissioning in Progress' in Namenode UI.(xiwang)
Date Tue, 24 Nov 2015 23:21:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 689cfea16 -> aa465686f


AMBARI-14030. Datanode shows up prematurely as 'Decomissioned' in Ambari UI while it is 'Decomissioning
in Progress' in Namenode UI.(xiwang)


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

Branch: refs/heads/trunk
Commit: aa465686f3959d76254a8a00cfdd832747a602f4
Parents: 689cfea
Author: Xi Wang <xiwang@apache.org>
Authored: Mon Nov 23 19:14:32 2015 -0800
Committer: Xi Wang <xiwang@apache.org>
Committed: Tue Nov 24 15:20:32 2015 -0800

----------------------------------------------------------------------
 .../host_component_views/datanode_view.js       | 30 +++++++++++---------
 1 file changed, 16 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/aa465686/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js
b/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js
index 64bc775..f7178cc 100644
--- a/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js
+++ b/ambari-web/app/views/main/host/details/host_component_views/datanode_view.js
@@ -86,22 +86,24 @@ App.DataNodeComponentView = App.HostComponentView.extend(App.Decommissionable,
{
     if (curObj) {
       var liveNodesJson = App.parseJSON(curObj.LiveNodes);
       // HDP-2 stack
-      if (liveNodesJson && liveNodesJson[hostName]) {
-        switch (liveNodesJson[hostName].adminState) {
-          case "In Service":
-            this.setStatusAs('INSERVICE');
-            break;
-          case "Decommission In Progress":
-            this.setStatusAs('DECOMMISSIONING');
-            break;
-          case "Decommissioned":
-            this.setStatusAs('DECOMMISSIONED');
-            break;
+      for (var hostPort in liveNodesJson) {
+        if(hostPort.indexOf(hostName) == 0) {
+          switch (liveNodesJson[hostPort].adminState) {
+            case "In Service":
+              this.setStatusAs('INSERVICE');
+              break;
+            case "Decommission In Progress":
+              this.setStatusAs('DECOMMISSIONING');
+              break;
+            case "Decommissioned":
+              this.setStatusAs('DECOMMISSIONED');
+              break;
+          }
+          return;
         }
-      } else {
-        // if namenode is down, get desired_admin_state to decide if the user had issued
a decommission
-        this.getDesiredAdminState();
       }
+      // if namenode is down, get desired_admin_state to decide if the user had issued a
decommission
+      this.getDesiredAdminState();
     }
   }
 });


Mime
View raw message