You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by xi...@apache.org on 2014/05/20 02:53:01 UTC
git commit: AMBARI-5818. Decommission of RegionServer is
failed.(xiwang)
Repository: ambari
Updated Branches:
refs/heads/branch-1.6.0 51aceee05 -> 63e133893
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/63e13389
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/63e13389
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/63e13389
Branch: refs/heads/branch-1.6.0
Commit: 63e133893bc56a9cf69ad0163cc3f75a10fd64a8
Parents: 51aceee
Author: Xi Wang <xi...@apache.org>
Authored: Mon May 19 17:39:09 2014 -0700
Committer: Xi Wang <xi...@apache.org>
Committed: Mon May 19 17:39:22 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/63e13389/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 d724f95..41a0e42 100644
--- a/ambari-web/app/controllers/main/host.js
+++ b/ambari-web/app/controllers/main/host.js
@@ -341,28 +341,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/63e13389/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 da3073b..f1a778e 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -924,7 +924,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();
},