Переглянути джерело

AMBARI-3447. Reassign Master Wizard: move ResourceManager in 2.x stack (non-secure). (akovalenko)

Aleksandr Kovalenko 11 роки тому
батько
коміт
948a41fc59

+ 20 - 7
ambari-web/app/controllers/wizard/step13_controller.js

@@ -174,6 +174,9 @@ App.WizardStep13Controller = App.HighAvailabilityProgressPageController.extend({
       case 'JOBTRACKER':
         urlParams.push('(type=mapred-site&tag=' + data.Clusters.desired_configs['mapred-site'].tag + ')');
         break;
+      case 'RESOURCEMANAGER':
+        urlParams.push('(type=yarn-site&tag=' + data.Clusters.desired_configs['yarn-site'].tag + ')');
+        break;
     }
     App.ajax.send({
       name: 'reassign.load_configs',
@@ -228,14 +231,24 @@ App.WizardStep13Controller = App.HighAvailabilityProgressPageController.extend({
         configs['mapred-site']['mapred.job.tracker.http.address'] = targetHostName + ':50030';
         configs['mapred-site']['mapred.job.tracker'] = targetHostName + ':50300';
         break;
+      case 'RESOURCEMANAGER':
+        configs['yarn-site']['yarn.resourcemanager.address'] = targetHostName + ':8050';
+        configs['yarn-site']['yarn.resourcemanager.admin.address'] = targetHostName + ':8141';
+        configs['yarn-site']['yarn.resourcemanager.resource-tracker.address'] = targetHostName + ':8025';
+        configs['yarn-site']['yarn.resourcemanager.scheduler.address'] = targetHostName + ':8030';
+        configs['yarn-site']['yarn.resourcemanager.webapp.address'] = targetHostName + ':8088';
+        configs['yarn-site']['yarn.resourcemanager.hostname'] = targetHostName;
+        break;
+    }
+    if (componentDir) {
+      App.router.get(this.get('content.controllerName')).saveComponentDir(componentDir);
+      App.clusterStatus.setClusterStatus({
+        clusterName: this.get('content.cluster.name'),
+        clusterState: this.get('clusterDeployState'),
+        wizardControllerName: this.get('content.controllerName'),
+        localdb: App.db.data
+      });
     }
-    App.router.get(this.get('content.controllerName')).saveComponentDir(componentDir);
-    App.clusterStatus.setClusterStatus({
-      clusterName: this.get('content.cluster.name'),
-      clusterState: this.get('clusterDeployState'),
-      wizardControllerName: this.get('content.controllerName'),
-      localdb: App.db.data
-    });
     for (var site in configs) {
       if (!configs.hasOwnProperty(site)) continue;
       App.ajax.send({

+ 2 - 2
ambari-web/app/messages.js

@@ -560,8 +560,8 @@ Em.I18n.translations = {
   'installer.step13.task2.title':'{0} disable',
   'installer.step13.task3.title':'{1} reconfigure',
   'installer.step13.task4.title':'{0} install',
-  'installer.step13.task5.title':'{1} start',
-  'installer.step13.task6.title':'{0} remove',
+  'installer.step13.task5.title':'{1} remove',
+  'installer.step13.task6.title':'{0} start',
   'installer.step13.status.success': 'Successfully reassigned {0}',
   'installer.step13.status.success.withManualSteps': 'Proceed to the next step',
   'installer.step13.status.failed': 'Failed to reassign {0}',

+ 1 - 0
ambari-web/app/views/main/service/item.js

@@ -27,6 +27,7 @@ App.MainServiceItemView = Em.View.extend({
       case 'GANGLIA':
       case 'NAGIOS':
         break;
+      case 'YARN':
       case 'HDFS':
       case 'MAPREDUCE':
         if (App.supports.reassignMaster) {

+ 2 - 2
ambari-web/app/views/wizard/step13_view.js

@@ -33,9 +33,9 @@ App.WizardStep13View = App.HighAvailabilityProgressPageView.extend({
 
   noticeCompleted: function () {
     if (this.get('controller.content.hasManualSteps')) {
-      return Em.I18n.t('installer.step13.status.success.withManualSteps').format(this.get('controller.content.reassign.component_name'));
+      return Em.I18n.t('installer.step13.status.success.withManualSteps').format(App.format.role(this.get('controller.content.reassign.component_name')));
     } else {
-      return Em.I18n.t('installer.step13.status.success').format(this.get('controller.content.reassign.component_name'));
+      return Em.I18n.t('installer.step13.status.success').format(App.format.role(this.get('controller.content.reassign.component_name')));
     }
   }.property('controller.content.reassign.component_name'),