|
@@ -882,7 +882,7 @@ App.MainHostDetailsController = Em.Controller.extend({
|
|
|
this.doRecommissionAndRestart(hostName, svcName, "JOBTRACKER", "TASKTRACKER");
|
|
|
break;
|
|
|
case 'HBASE':
|
|
|
- this.doRecommissionAndStartRegionServer(hostName, svcName, "HBASE_MASTER", "HBASE_REGIONSERVER");
|
|
|
+ this.doRecommissionAndStart(hostName, svcName, "HBASE_MASTER", "HBASE_REGIONSERVER");
|
|
|
}
|
|
|
this.showBackgroundOperationsPopup();
|
|
|
},
|
|
@@ -971,7 +971,6 @@ App.MainHostDetailsController = Em.Controller.extend({
|
|
|
"RequestInfo": {
|
|
|
"context": Em.I18n.t('hosts.host.regionserver.decommission.batch1'),
|
|
|
"command": "DECOMMISSION",
|
|
|
- "exclusive" :"true",
|
|
|
"parameters": {
|
|
|
"slave_type": slaveType,
|
|
|
"excluded_hosts": hostNames
|
|
@@ -991,11 +990,10 @@ App.MainHostDetailsController = Em.Controller.extend({
|
|
|
{
|
|
|
"order_id": 2,
|
|
|
"type": "PUT",
|
|
|
- "uri": App.get('apiPrefix') + "/clusters/" + App.get('clusterName') +"/hosts/" + hostNames + "/host_components/" + slaveType,
|
|
|
+ "uri": App.get('apiPrefix') + "/clusters/" + App.get('clusterName') + "/host_components/" + slaveType,
|
|
|
"RequestBodyInfo": {
|
|
|
"RequestInfo": {
|
|
|
context: Em.I18n.t('hosts.host.regionserver.decommission.batch2'),
|
|
|
- exclusive:true,
|
|
|
operation_level: {
|
|
|
level: "HOST_COMPONENT",
|
|
|
cluster_name: App.get('clusterName'),
|
|
@@ -1020,11 +1018,10 @@ App.MainHostDetailsController = Em.Controller.extend({
|
|
|
"command": "DECOMMISSION",
|
|
|
"service_name": serviceName,
|
|
|
"component_name": componentName,
|
|
|
- "exclusive" :"true",
|
|
|
"parameters": {
|
|
|
"slave_type": slaveType,
|
|
|
"excluded_hosts": hostNames,
|
|
|
- "mark_draining_only": true
|
|
|
+ "mark_draining_only": "true"
|
|
|
},
|
|
|
'operation_level': {
|
|
|
level: "HOST_COMPONENT",
|
|
@@ -1071,7 +1068,7 @@ App.MainHostDetailsController = Em.Controller.extend({
|
|
|
return false;
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* Performs Recommission and Start
|
|
|
* @param {string} hostNames
|
|
@@ -1100,7 +1097,6 @@ App.MainHostDetailsController = Em.Controller.extend({
|
|
|
"RequestInfo": {
|
|
|
"context": context_1,
|
|
|
"command": "DECOMMISSION",
|
|
|
- "exclusive": true,
|
|
|
"parameters": {
|
|
|
"slave_type": slaveType,
|
|
|
"included_hosts": hostNames
|
|
@@ -1124,83 +1120,6 @@ App.MainHostDetailsController = Em.Controller.extend({
|
|
|
"RequestBodyInfo": {
|
|
|
"RequestInfo": {
|
|
|
context: startContext,
|
|
|
- exclusive:true,
|
|
|
- operation_level: {
|
|
|
- level: "HOST_COMPONENT",
|
|
|
- cluster_name: App.get('clusterName'),
|
|
|
- host_name: hostNames,
|
|
|
- service_name: serviceName || null
|
|
|
- }
|
|
|
- },
|
|
|
- "Body": {
|
|
|
- HostRoles: {
|
|
|
- state: "STARTED"
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- success: 'decommissionSuccessCallback',
|
|
|
- error: 'decommissionErrorCallback'
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * Performs Recommission and Start
|
|
|
- * @param {string} hostNames
|
|
|
- * @param {string} serviceName
|
|
|
- * @param {string} componentName
|
|
|
- * @param {string} slaveType
|
|
|
- * @method doRecommissionAndStart
|
|
|
- */
|
|
|
- doRecommissionAndStartRegionServer: function (hostNames, serviceName, componentName, slaveType) {
|
|
|
- var contextNameString_1 = 'hosts.host.' + slaveType.toLowerCase() + '.recommission';
|
|
|
- var context_1 = Em.I18n.t(contextNameString_1);
|
|
|
- var contextNameString_2 = 'requestInfo.startHostComponent.' + slaveType.toLowerCase();
|
|
|
- var startContext = Em.I18n.t(contextNameString_2);
|
|
|
- App.ajax.send({
|
|
|
- name: 'host.host_component.recommission_and_restart',
|
|
|
- sender: this,
|
|
|
- data: {
|
|
|
- intervalTimeSeconds: 1,
|
|
|
- tolerateSize: 1,
|
|
|
- batches: [
|
|
|
- {
|
|
|
- "order_id": 1,
|
|
|
- "type": "POST",
|
|
|
- "uri": App.apiPrefix + "/clusters/" + App.get('clusterName') + "/requests",
|
|
|
- "RequestBodyInfo": {
|
|
|
- "RequestInfo": {
|
|
|
- "context": context_1,
|
|
|
- "command": "DECOMMISSION",
|
|
|
- "exclusive":"true",
|
|
|
- "parameters": {
|
|
|
- "slave_type": slaveType,
|
|
|
- "mark_draining_only": true,
|
|
|
- "included_hosts": hostNames
|
|
|
- },
|
|
|
- 'operation_level': {
|
|
|
- level: "HOST_COMPONENT",
|
|
|
- cluster_name: App.get('clusterName'),
|
|
|
- host_name: hostNames,
|
|
|
- service_name: serviceName
|
|
|
- }
|
|
|
- },
|
|
|
- "Requests/resource_filters": [
|
|
|
- {"service_name": serviceName, "component_name": componentName}
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "order_id": 2,
|
|
|
- "type": "PUT",
|
|
|
- "uri": App.get('apiPrefix') + "/clusters/" + App.get('clusterName') +"/hosts/" + hostNames + "/host_components/" + slaveType,
|
|
|
- "RequestBodyInfo": {
|
|
|
- "RequestInfo": {
|
|
|
- context: startContext,
|
|
|
- exclusive:true,
|
|
|
operation_level: {
|
|
|
level: "HOST_COMPONENT",
|
|
|
cluster_name: App.get('clusterName'),
|
|
@@ -1250,7 +1169,6 @@ App.MainHostDetailsController = Em.Controller.extend({
|
|
|
"RequestInfo": {
|
|
|
"context": context_1,
|
|
|
"command": "DECOMMISSION",
|
|
|
- "exclusive":"true",
|
|
|
"parameters": {
|
|
|
"slave_type": slaveType,
|
|
|
"included_hosts": hostNames
|
|
@@ -1277,7 +1195,6 @@ App.MainHostDetailsController = Em.Controller.extend({
|
|
|
"command": "RESTART",
|
|
|
"service_name": serviceName,
|
|
|
"component_name": slaveType,
|
|
|
- "exclusive":"true",
|
|
|
"hosts": hostNames
|
|
|
}
|
|
|
}
|