Browse Source

AMBARI-3390. Reassign Master Wizard: move Secondary NameNode in 1.x stack (non-secure). (akovalenko)

Aleksandr Kovalenko 11 years ago
parent
commit
53597260b5

+ 1 - 1
ambari-web/app/controllers/main/service/reassign_controller.js

@@ -55,7 +55,7 @@ App.ReassignMasterController = App.WizardController.extend({
     hasManualSteps: false
   }),
 
-  componentsWithManualSteps: ['NAMENODE'],
+  componentsWithManualSteps: ['NAMENODE', 'SECONDARY_NAMENODE'],
 
   addManualSteps: function () {
     this.set('content.hasManualSteps', this.get('componentsWithManualSteps').contains(this.get('content.reassign.component_name')));

+ 8 - 1
ambari-web/app/controllers/wizard/step13_controller.js

@@ -167,6 +167,9 @@ App.WizardStep13Controller = App.HighAvailabilityProgressPageController.extend({
           urlParams.push('(type=hbase-site&tag=' + data.Clusters.desired_configs['hbase-site'].tag + ')');
         }
         break;
+      case 'SECONDARY_NAMENODE':
+        urlParams.push('(type=hdfs-site&tag=' + data.Clusters.desired_configs['hdfs-site'].tag + ')');
+        break;
     }
     App.ajax.send({
       name: 'reassign.load_configs',
@@ -204,6 +207,10 @@ App.WizardStep13Controller = App.HighAvailabilityProgressPageController.extend({
           configs['hbase-site']['hbase.rootdir'] = configs['hbase-site']['hbase.rootdir'].replace(/\/\/[^\/]*/, '//' + targetHostName);
         }
         break;
+      case 'SECONDARY_NAMENODE':
+        componentDir = configs['hdfs-site']['fs.checkpoint.dir'];
+        configs['hdfs-site']['dfs.secondary.http.address'] = targetHostName + ':50090';
+        break;
     }
     App.router.get(this.get('content.controllerName')).saveComponentDir(componentDir);
     App.clusterStatus.setClusterStatus({
@@ -280,4 +287,4 @@ App.WizardStep13Controller = App.HighAvailabilityProgressPageController.extend({
       }
     }
   }
-})
+})

+ 6 - 0
ambari-web/app/messages.js

@@ -577,6 +577,12 @@ Em.I18n.translations = {
       '<div class="code-snippet">mkdir -p /var/run/hadoop/hdfs/namenode/formatted</div></li>' +
       '<li>Proceed next' +
       '</ol>',
+  'installer.step14.body.secondary_namenode': '<ol>' +
+      '<li>Copy contents of <b>{0}</b> from source host <b>{1}</b> to the target host <b>{2}</b> same locations</li>' +
+      '<li>Login to the target host <b>{2}</b> and change permissions for the SNameNode dirs by running:' +
+      '<div class="code-snippet">chown -R hdfs:hadoop /hadoop/hdfs/namesecondary/</div></li>' +
+      '<li>Proceed next' +
+      '</ol>',
   'installer.step15.header': 'Install, Start and Test',
   'installer.step15.task0.title':'{0} remove',
   'installer.step15.task1.title':'{1} start',