This is an automated email from the ASF dual-hosted git repository.

akovalenko pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 9a8b959  AMBARI-23406. NN Federation: replace start/stop operation 
with restart operation (akovalenko)
9a8b959 is described below

commit 9a8b959781a1ccbc50403eef9d6779b944da579c
Author: Aleksandr Kovalenko <[email protected]>
AuthorDate: Thu Mar 29 17:40:26 2018 +0300

    AMBARI-23406. NN Federation: replace start/stop operation with restart 
operation (akovalenko)
---
 .../main/admin/federation/step4_controller.js      | 15 ++++++------
 .../main/admin/highAvailability_controller.js      | 13 +++++++++++
 ambari-web/app/messages.js                         | 27 +++++++++++-----------
 3 files changed, 35 insertions(+), 20 deletions(-)

diff --git 
a/ambari-web/app/controllers/main/admin/federation/step4_controller.js 
b/ambari-web/app/controllers/main/admin/federation/step4_controller.js
index f725f1a..9c9c9dd 100644
--- a/ambari-web/app/controllers/main/admin/federation/step4_controller.js
+++ b/ambari-web/app/controllers/main/admin/federation/step4_controller.js
@@ -22,7 +22,7 @@ App.NameNodeFederationWizardStep4Controller = 
App.HighAvailabilityProgressPageCo
 
   name: "nameNodeFederationWizardStep4Controller",
 
-  commands: ['stopAllServices', 'reconfigureHDFS', 'installNameNode', 
'installZKFC', 'formatNameNode', 'formatZKFC', 'startZKFC', 'startNameNode', 
'bootstrapNameNode', 'createWidgets', 'startZKFC2', 'startNameNode2', 
'startAllServices'],
+  commands: ['reconfigureHDFS', 'installNameNode', 'installZKFC', 
'formatNameNode', 'formatZKFC', 'startZKFC', 'startNameNode', 
'bootstrapNameNode', 'createWidgets', 'startZKFC2', 'startNameNode2', 
'restartAllServices'],
 
   tasksMessagesPrefix: 'admin.nameNodeFederation.wizard.step',
 
@@ -52,10 +52,6 @@ App.NameNodeFederationWizardStep4Controller = 
App.HighAvailabilityProgressPageCo
     this.createInstallComponentTask('HDFS_CLIENT', hostNames, 'HDFS');
   },
 
-  stopAllServices: function () {
-    this.stopServices([], true, true);
-  },
-
   installNameNode: function () {
     this.createInstallComponentTask('NAMENODE', this.get('newNameNodeHosts'), 
"HDFS");
   },
@@ -184,8 +180,13 @@ App.NameNodeFederationWizardStep4Controller = 
App.HighAvailabilityProgressPageCo
     this.updateComponent('NAMENODE', this.get('newNameNodeHosts')[1], "HDFS", 
"Start");
   },
 
-  startAllServices: function () {
-    this.startServices(false);
+  restartAllServices: function () {
+    App.ajax.send({
+      name: 'restart.allServices',
+      sender: this,
+      success: 'startPolling',
+      error: 'onTaskError'
+    });
   },
 
   getNameNodeWidgets: function () {
diff --git 
a/ambari-web/app/controllers/main/admin/highAvailability_controller.js 
b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
index 2e4eeed..e9a86df 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability_controller.js
@@ -121,6 +121,19 @@ App.MainAdminHighAvailabilityController = 
App.WizardController.extend({
    * @return {Boolean}
    */
   enableNameNodeFederation: function () {
+    //Prerequisite Checks
+    var message = [];
+    if (!App.HostComponent.find().filterProperty('componentName', 
'ZOOKEEPER_SERVER').everyProperty('workStatus', 'STARTED')) {
+      
message.push(Em.I18n.t('admin.nameNodeFederation.wizard.required.zookeepers'));
+    }
+
+    if (!App.HostComponent.find().filterProperty('componentName', 
'JOURNALNODE').everyProperty('workStatus', 'STARTED')) {
+      
message.push(Em.I18n.t('admin.nameNodeFederation.wizard.required.journalnodes'));
+    }
+    if (message.length > 0) {
+      this.showErrorPopup(message);
+      return false;
+    }
     App.router.transitionTo('main.services.enableNameNodeFederation');
     return true;
   },
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 0c52e6a..7370032 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1669,6 +1669,8 @@ Em.I18n.translations = {
   'If you choose to quit, you must follow manual instructions to complete or 
revert enabling Ranger Admin HA as documented in the Ambari User Guide. Are you 
sure you want to exit the wizard?',
 
   'admin.nameNodeFederation.button.enable':'Add New HDFS Namespace',
+  'admin.nameNodeFederation.wizard.required.zookeepers': 'All ZooKeeper 
Servers should be up',
+  'admin.nameNodeFederation.wizard.required.journalnodes': 'All JournalNodes 
should be up',
   'admin.nameNodeFederation.wizard.header': 'Add New HDFS Namespace',
   'admin.nameNodeFederation.closePopup': 'Add New HDFS Namespace Wizard is in 
progress. You must allow the wizard to complete for Ambari to be in usable 
state. If you choose to quit, you must follow manual instructions to complete 
or revert Add New HDFS Namespace as documented in the Ambari User Guide. Are 
you sure you want to exit the wizard?',
   'admin.nameNodeFederation.wizard.step1.header': 'Get Started',
@@ -1687,19 +1689,18 @@ Em.I18n.translations = {
   'admin.nameNodeFederation.wizard,step4.save.configuration.note':'This 
configuration is created by Enable NameNode Federation wizard',
   'admin.nameNodeFederation.wizard.step4.notice.inProgress':'Please wait while 
NameNode Federation Wizard is being deployed.',
   'admin.nameNodeFederation.wizard.step4.notice.completed':'NameNode 
Federation Wizard has been enabled successfully.',
-  'admin.nameNodeFederation.wizard.step4.task0.title': 'Stop All Services',
-  'admin.nameNodeFederation.wizard.step4.task1.title': 'Reconfigure HDFS',
-  'admin.nameNodeFederation.wizard.step4.task2.title': 'Install Additional 
NameNodes',
-  'admin.nameNodeFederation.wizard.step4.task3.title': 'Install Additional 
ZKFCs',
-  'admin.nameNodeFederation.wizard.step4.task4.title': 'Format NameNode',
-  'admin.nameNodeFederation.wizard.step4.task5.title': 'Format ZKFC',
-  'admin.nameNodeFederation.wizard.step4.task6.title': 'Start ZKFC',
-  'admin.nameNodeFederation.wizard.step4.task7.title': 'Start NameNode',
-  'admin.nameNodeFederation.wizard.step4.task8.title': 'Bootstrap NameNode',
-  'admin.nameNodeFederation.wizard.step4.task9.title': 'Create widgets',
-  'admin.nameNodeFederation.wizard.step4.task10.title': 'Start ZKFC',
-  'admin.nameNodeFederation.wizard.step4.task11.title': 'Start NameNode',
-  'admin.nameNodeFederation.wizard.step4.task12.title': 'Start All Services',
+  'admin.nameNodeFederation.wizard.step4.task0.title': 'Reconfigure HDFS',
+  'admin.nameNodeFederation.wizard.step4.task1.title': 'Install Additional 
NameNodes',
+  'admin.nameNodeFederation.wizard.step4.task2.title': 'Install Additional 
ZKFCs',
+  'admin.nameNodeFederation.wizard.step4.task3.title': 'Format NameNode',
+  'admin.nameNodeFederation.wizard.step4.task4.title': 'Format ZKFC',
+  'admin.nameNodeFederation.wizard.step4.task5.title': 'Start ZKFC',
+  'admin.nameNodeFederation.wizard.step4.task6.title': 'Start NameNode',
+  'admin.nameNodeFederation.wizard.step4.task7.title': 'Bootstrap NameNode',
+  'admin.nameNodeFederation.wizard.step4.task8.title': 'Create widgets',
+  'admin.nameNodeFederation.wizard.step4.task9.title': 'Start ZKFC',
+  'admin.nameNodeFederation.wizard.step4.task10.title': 'Start NameNode',
+  'admin.nameNodeFederation.wizard.step4.task11.title': 'Restart Required 
Services',
 
   'admin.security.title':'Kerberos security has not been enabled',
   'admin.security.enabled': 'Kerberos security is enabled',

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to