ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject [2/2] git commit: AMBARI-5818. Decommission of RegionServer is failed.(xiwang)
Date Tue, 20 May 2014 01:21:57 GMT
AMBARI-5818. Decommission of RegionServer is failed.(xiwang)


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

Branch: refs/heads/trunk
Commit: b6c56e80730c5847d08c0cc0243858188ad86cf8
Parents: 2220427
Author: Xi Wang <xiwang@apache.org>
Authored: Mon May 19 17:39:09 2014 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Mon May 19 18:19:17 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers/main/host.js         | 47 +++++++++++---------
 ambari-web/app/controllers/main/host/details.js |  2 +-
 2 files changed, 27 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b6c56e80/ambari-web/app/controllers/main/host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js
index 31bc036..a99b56a 100644
--- a/ambari-web/app/controllers/main/host.js
+++ b/ambari-web/app/controllers/main/host.js
@@ -343,28 +343,33 @@ App.MainHostController = Em.ArrayController.extend({
       } else {
         hostsWithComponentInProperState = components.filterProperty('workStatus','STARTED').mapProperty('host.hostName');
         //For decommession
-        var parameters = {
-          "slave_type": slaveName
-        };
-        var contextString = turn_off? 'hosts.host.' + slaveName.toLowerCase() + '.recommission':
-          'hosts.host.' + slaveName.toLowerCase() + '.decommission';
-        if (turn_off) {
-          parameters['included_hosts'] = hostsWithComponentInProperState.join(',')
-        }
-        else {
-          parameters['excluded_hosts'] = hostsWithComponentInProperState.join(',');
+        if (svcName == "HBASE") {
+          // HBASE service, decommission RegionServer in batch requests
+          App.router.get('mainHostDetailsController').doDecommissionRegionServer(hostNames,
svcName, masterName, slaveName);
+        } else {
+          var parameters = {
+            "slave_type": slaveName
+          };
+          var contextString = turn_off? 'hosts.host.' + slaveName.toLowerCase() + '.recommission':
+            'hosts.host.' + slaveName.toLowerCase() + '.decommission';
+          if (turn_off) {
+            parameters['included_hosts'] = hostsWithComponentInProperState.join(',')
+          }
+          else {
+            parameters['excluded_hosts'] = hostsWithComponentInProperState.join(',');
+          }
+          App.ajax.send({
+            name: 'bulk_request.decommission',
+            sender: this,
+            data: {
+              context: Em.I18n.t(contextString),
+              serviceName: service.get('serviceName'),
+              componentName: operationData.componentName,
+              parameters: parameters
+            },
+            success: 'bulkOperationForHostComponentsSuccessCallback'
+          });
         }
-        App.ajax.send({
-          name: 'bulk_request.decommission',
-          sender: this,
-          data: {
-            context: Em.I18n.t(contextString),
-            serviceName: service.get('serviceName'),
-            componentName: operationData.componentName,
-            parameters: parameters
-          },
-          success: 'bulkOperationForHostComponentsSuccessCallback'
-        });
       }
     }
     else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/b6c56e80/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index cfbf086..430feaf 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -940,7 +940,7 @@ App.MainHostDetailsController = Em.Controller.extend({
         this.doDecommission(hostName, svcName, "JOBTRACKER", "TASKTRACKER");
         break;
       case 'HBASE':
-        this.doDecommission(hostName, svcName, "HBASE_MASTER", "HBASE_REGIONSERVER");
+        this.doDecommissionRegionServer(hostName, svcName, "HBASE_MASTER", "HBASE_REGIONSERVER");
     }
     this.showBackgroundOperationsPopup();
   },


Mime
View raw message