Repository: ambari Updated Branches: refs/heads/trunk 892c6ad36 -> db63a74e7
AMBARI-4932. Moving ResourceManager/JobTracker requires shutting down entire cluster. (Mikhail Bayuk via akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/db63a74e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/db63a74e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/db63a74e Branch: refs/heads/trunk Commit: db63a74e796485ec7bcdaee71e3b4e57c7f3d46b Parents: 892c6ad Author: Aleksandr Kovalenko <[email protected]> Authored: Wed Mar 12 20:35:57 2014 +0200 Committer: Aleksandr Kovalenko <[email protected]> Committed: Wed Mar 12 20:36:31 2014 +0200 ---------------------------------------------------------------------- .../main/service/reassign/step4_controller.js | 50 +++++++++++++++----- ambari-web/app/messages.js | 6 +-- ambari-web/app/utils/ajax.js | 38 +++++++++++++++ 3 files changed, 79 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/db63a74e/ambari-web/app/controllers/main/service/reassign/step4_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js index a96c712..8c29fe4 100644 --- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js @@ -29,6 +29,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro multiTaskCounter: 0, hostComponents: [], + restartYarnMRComponents: false, loadStep: function () { if (this.get('content.reassign.component_name') === 'NAMENODE' && App.get('isHaEnabled')) { @@ -36,6 +37,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro } else { this.set('hostComponents', [this.get('content.reassign.component_name')]); } + this.set('restartYarnMRComponents', ['RESOURCEMANAGER', 'JOBTRACKER'].contains(this.get('content.reassign.component_name'))); this.set('serviceName', [this.get('content.reassign.service_id')]); this._super(); }, @@ -95,12 +97,24 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro }, stopServices: function () { - App.ajax.send({ - name: 'reassign.stop_services', - sender: this, - success: 'startPolling', - error: 'onTaskError' - }); + if(this.get('restartYarnMRComponents')) { + var list = App.Service.find().mapProperty("serviceName").without("HDFS").join(','); + var conf = { + name: 'reassign.stop_YMR2_services', + sender: this, + data: {servicesList: list}, + success: 'startPolling', + error: 'onTaskError' + }; + App.ajax.send(conf); + } else { + App.ajax.send({ + name: 'reassign.stop_services', + sender: this, + success: 'startPolling', + error: 'onTaskError' + }); + } }, createHostComponents: function () { @@ -320,12 +334,24 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro }, startServices: function () { - App.ajax.send({ - name: 'reassign.start_services', - sender: this, - success: 'startPolling', - error: 'onTaskError' - }); + if(this.get('restartYarnMRComponents')) { + var list = App.Service.find().mapProperty("serviceName").without("HDFS").join(','); + var conf = { + name: 'reassign.start_YMR2_services', + sender: this, + data: {servicesList: list}, + success: 'startPolling', + error: 'onTaskError' + }; + App.ajax.send(conf); + } else { + App.ajax.send({ + name: 'reassign.start_services', + sender: this, + success: 'startPolling', + error: 'onTaskError' + }); + } }, deleteHostComponents: function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/db63a74e/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index fbcdf1c..838ce43 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1248,7 +1248,7 @@ Em.I18n.translations = { 'services.reassign.step1.message1': 'This wizard will walk you through moving {0}.<br/>', 'services.reassign.step1.message2': 'The process to reassign {0} involves a combination of <b>automated steps</b> (that will be handled by the wizard) and ' + '<b>manual steps</b> (that you must perform in sequence as instructed by the wizard).<br/><br/>', - 'services.reassign.step1.message3': '<br/><b>All services will be restarted as part of the wizard. You should plan a cluster maintenance window and prepare ' + + 'services.reassign.step1.message3': '<br/><b>All required services will be restarted as part of the wizard. You should plan a cluster maintenance window and prepare ' + 'for cluster downtime when moving {0}.</b>', 'services.reassign.step2.header':'Assign Master', @@ -1261,7 +1261,7 @@ Em.I18n.translations = { 'services.reassign.step3.sourceHost':'Source Host:', 'services.reassign.step3.component':'Component name:', 'services.reassign.step4.header':'Configure Component', - 'services.reassign.step4.task0.title':'Stop All Services', + 'services.reassign.step4.task0.title':'Stop Required Services', 'services.reassign.step4.task1.title':'Create {0}', 'services.reassign.step4.task2.title':'Disable {0}', 'services.reassign.step4.task3.title':'Reconfigure {0}', @@ -1269,7 +1269,7 @@ Em.I18n.translations = { 'services.reassign.step4.task5.title':'Start ZooKeeper Servers', 'services.reassign.step4.task6.title':'Start NameNode', 'services.reassign.step4.task7.title':'Delete disabled {0}', - 'services.reassign.step4.task8.title':'Start All Services', + 'services.reassign.step4.task8.title':'Start Required Services', 'services.reassign.step4.status.success': 'Successfully moved <b>{0}</b> from <b>{1}</b> host to <b>{2}</b> host', 'services.reassign.step4.status.success.withManualSteps': 'Proceed to the next step', 'services.reassign.step4.status.failed': 'Failed to move <b>{0}</b> from <b>{1}</b> host to <b>{2}</b> host', http://git-wip-us.apache.org/repos/asf/ambari/blob/db63a74e/ambari-web/app/utils/ajax.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js index 76504be..f3528aa 100644 --- a/ambari-web/app/utils/ajax.js +++ b/ambari-web/app/utils/ajax.js @@ -160,6 +160,25 @@ var urls = { } } }, + 'reassign.stop_YMR2_services': { + 'real': '/clusters/{clusterName}/services?ServiceInfo/service_name.in({servicesList})', + 'mock': '', + 'format': function() { + return { + type: 'PUT', + data: JSON.stringify({ + "RequestInfo": { + "context": "Stop without HDFS" + }, + "Body": { + "ServiceInfo": { + "state": "INSTALLED" + } + } + }) + } + } + }, 'reassign.start_services': { 'real': '/clusters/{clusterName}/services?params/run_smoke_test=true', 'mock': '', @@ -179,6 +198,25 @@ var urls = { } } }, + 'reassign.start_YMR2_services': { + 'real': '/clusters/{clusterName}/services/?ServiceInfo/service_name.in({servicesList})', + 'mock': '', + 'format': function() { + return { + type: 'PUT', + data: JSON.stringify({ + "RequestInfo": { + "context": "Start without HDFS" + }, + "Body": { + "ServiceInfo": { + "state": "STARTED" + } + } + }) + } + } + }, 'reassign.maintenance_mode': { 'real': '/clusters/{clusterName}/hosts/{hostName}/host_components/{componentName}', 'mock': '',
