incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject [1/2] git commit: Revert "AMBARI-3277. HDFS shows red when NameNode HA is enabled. (xiwang via yusaku)"
Date Fri, 20 Sep 2013 23:40:58 GMT
Updated Branches:
  refs/heads/branch-1.4.1 3dc20e98e -> 50b05c5b0


Revert "AMBARI-3277. HDFS shows red when NameNode HA is enabled. (xiwang via yusaku)"

This reverts commit 074d8395ea8f727fa54b58700ef5cab6382d0af9.


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

Branch: refs/heads/branch-1.4.1
Commit: 2daca666f5431a7d595a565f498235fa92de9787
Parents: 3dc20e9
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Fri Sep 20 16:23:02 2013 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Fri Sep 20 16:37:57 2013 -0700

----------------------------------------------------------------------
 ambari-web/app/models/service.js      | 16 ++++++----------
 ambari-web/app/models/service/hdfs.js |  7 -------
 2 files changed, 6 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2daca666/ambari-web/app/models/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service.js b/ambari-web/app/models/service.js
index b2eee69..5730fb1 100644
--- a/ambari-web/app/models/service.js
+++ b/ambari-web/app/models/service.js
@@ -71,7 +71,8 @@ App.Service = DS.Model.extend({
       serviceName = this.get('serviceName'),
       isRunning = true,
       runningHCs = [],
-      unknownHCs = [];
+      unknownHCs = [],
+      hdfsHealthStatus;
 
     //look through all components to find out common statuses
     this.get('hostComponents').forEach(function (_hostComponent) {
@@ -132,21 +133,16 @@ App.Service = DS.Model.extend({
       }
     }
 
-    /**
-     * Both App.HDFSService and its parent (App.Service) can hit this block.
-     * We need a property: App.HDFSService.hdfsHealthStatus to store the correct status.
-     * When App.HDFSService get in, we store the status in that property based on if activeNN
existed.
-     * When App.Service get in, we get correct health status from that property.
-     */
     if (isGreen && serviceName === 'HDFS' && masterComponents.length == 5)
{ // enabled HA
       var activeNN = this.get('activeNameNode');
       var nameNode = this.get('nameNode');
+
       if (nameNode && !activeNN) { //hdfs model but no active NN
-        App.HDFSService.hdfsHealthStatus = 'red';
+        hdfsHealthStatus = 'red';
       } else if (nameNode && activeNN) {
-        App.HDFSService.hdfsHealthStatus = 'green';
+        hdfsHealthStatus = 'green';
       }
-      this.set('healthStatus', App.HDFSService.hdfsHealthStatus);
+      this.set('healthStatus', hdfsHealthStatus);
     }
 
     this.set('isStarted', everyStarted);

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2daca666/ambari-web/app/models/service/hdfs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service/hdfs.js b/ambari-web/app/models/service/hdfs.js
index c774ea8..d04dc94 100644
--- a/ambari-web/app/models/service/hdfs.js
+++ b/ambari-web/app/models/service/hdfs.js
@@ -46,11 +46,4 @@ App.HDFSService = App.Service.extend({
   nameNodeRpc: DS.attr('number')
 });
 
-/**
- * Use this property only in its parent class to store hdfs health status.
- */
-App.HDFSService.reopenClass({
-  hdfsHealthStatus: ''
-});
-
 App.HDFSService.FIXTURES = [];


Mime
View raw message