ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhuvnesh2...@apache.org
Subject ambari git commit: AMBARI-15382: Alert for updating HAWQ namespace after enabling HDFS HA (lav jain via bhuvnesh2703)
Date Tue, 15 Mar 2016 03:04:50 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 ac740437b -> 261335118


AMBARI-15382: Alert for updating HAWQ namespace after enabling HDFS HA (lav jain via bhuvnesh2703)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/26133511
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/26133511
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/26133511

Branch: refs/heads/branch-2.2
Commit: 2613351185e787c1ad218d972c15a1de8d749390
Parents: ac74043
Author: Bhuvnesh Chaudhary <bchaudhary@pivotal.io>
Authored: Mon Mar 14 20:05:01 2016 -0700
Committer: Bhuvnesh Chaudhary <bchaudhary@pivotal.io>
Committed: Mon Mar 14 20:05:01 2016 -0700

----------------------------------------------------------------------
 .../nameNode/step1_controller.js                |  6 +++
 ambari-web/app/messages.js                      |  7 +++
 .../app/routes/high_availability_routes.js      | 45 +++++++++++++-------
 .../admin/highAvailability/nameNode/step1.hbs   |  3 ++
 4 files changed, 45 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/26133511/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step1_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step1_controller.js
b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step1_controller.js
index 91a35b2..9bc7cdd 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step1_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step1_controller.js
@@ -23,10 +23,16 @@ require('controllers/main/admin/serviceAccounts_controller');
 App.HighAvailabilityWizardStep1Controller = Em.Controller.extend({
   name: "highAvailabilityWizardStep1Controller",
 
+  isHawqInstalled: false,
+
   isNameServiceIdValid: function () {
     return /^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])$/.test(this.get('content.nameServiceId'));
   }.property('content.nameServiceId'),
 
+  setHawqInstalled: function() {
+    this.set('isHawqInstalled', App.Service.find().someProperty('serviceName', 'HAWQ'));
+  },
+
   next: function () {
     if (this.get('isNameServiceIdValid')) {
       App.router.send('next');

http://git-wip-us.apache.org/repos/asf/ambari/blob/26133511/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 14f751e..5addc9b 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1215,6 +1215,10 @@ Em.I18n.translations = {
   'admin.highAvailability.wizard.step6.jnStopped':'All JournalNodes should be started before
initializing',
   'admin.highAvailability.wizard.step8.metaNoInit':'Metadata not initialized yet',
   'admin.highAvailability.wizard.step8.confirmPopup.body':'Please confirm that you have run
the manual steps before continuing.',
+  'admin.highAvailability.wizard.step9.hawq.confirmPopup.header':'Additional Steps Required
for HAWQ',
+  'admin.highAvailability.wizard.step9.hawq.confirmPopup.body':'You must refer to the HAWQ
documentation under section ' +
+     '"HAWQ Filespaces and High Availability Enabled HDFS" and perform the required manual
steps to update the HAWQ filespace ' +
+     'location. HAWQ will not use HDFS nameservice unless the steps have been completed successfully.',
 
   'admin.highAvailability.rollback.header':'Disable NameNode HA Wizard',
   'admin.highAvailability.rollback.task0.title':'Stop All Services',
@@ -1291,6 +1295,9 @@ Em.I18n.translations = {
     '<b>manual steps</b> (that you must perform in sequence as instructed by
the wizard).<br/><br/>' +
     '<b>You should plan a cluster maintenance window and prepare for cluster downtime
when enabling NameNode HA.</b>',
   'admin.highAvailability.wizard.step1.alert':'If you have HBase running, please exit this
wizard and stop HBase first.',
+  'admin.highAvailability.wizard.step1.hawq.alert':'<br/><br/>You will need to
perform additional manual ' +
+    'steps to update the HAWQ filespace location, once this wizard completes. Refer to the
HAWQ documentation under section ' +
+    '"HAWQ Filespaces and High Availability Enabled HDFS" for more information.',
 
   'admin.rm_highAvailability.wizard.header': 'Enable ResourceManager HA Wizard',
   'admin.rm_highAvailability.wizard.step1.header': 'Get Started',

http://git-wip-us.apache.org/repos/asf/ambari/blob/26133511/ambari-web/app/routes/high_availability_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/high_availability_routes.js b/ambari-web/app/routes/high_availability_routes.js
index 6da53fe..59cee97 100644
--- a/ambari-web/app/routes/high_availability_routes.js
+++ b/ambari-web/app/routes/high_availability_routes.js
@@ -114,6 +114,8 @@ module.exports = App.WizardRoute.extend({
         controller.setCurrentStep('1');
         controller.usersLoading().done(function () {
           controller.saveHdfsUser();
+          var highAvailabilityWizardStep1Controller = router.get('highAvailabilityWizardStep1Controller');
+          highAvailabilityWizardStep1Controller.setHawqInstalled();
           controller.loadAllPriorSteps().done(function () {
             controller.connectOutlet('highAvailabilityWizardStep1', controller.get('content'));
           });
@@ -322,22 +324,33 @@ module.exports = App.WizardRoute.extend({
       return false;
     },
     next: function (router) {
-      var controller = router.get('highAvailabilityWizardController');
-      controller.clearTasksData();
-      controller.finish();
-      App.clusterStatus.setClusterStatus({
-        clusterName: controller.get('content.cluster.name'),
-        clusterState: 'DEFAULT',
-        localdb: App.db.data
-      }, {
-        alwaysCallback: function () {
-          controller.get('popup').hide();
-          router.transitionTo('main.services.index');
-          Em.run.next(function() {
-            location.reload();
-          });
-        }
-      });
+      var proceed = function() {
+        var controller = router.get('highAvailabilityWizardController');
+        controller.clearTasksData();
+        controller.finish();
+        App.clusterStatus.setClusterStatus({
+          clusterName: controller.get('content.cluster.name'),
+          clusterState: 'DEFAULT',
+          localdb: App.db.data
+        }, {
+          alwaysCallback: function () {
+            controller.get('popup').hide();
+            router.transitionTo('main.services.index');
+            Em.run.next(function() {
+              location.reload();
+            });
+          }
+        });
+      };
+      if (App.Service.find().someProperty('serviceName', 'HAWQ')) {
+        App.showAlertPopup(
+            Em.I18n.t('admin.highAvailability.wizard.step9.hawq.confirmPopup.header'),
+            Em.I18n.t('admin.highAvailability.wizard.step9.hawq.confirmPopup.body'),
+            proceed);
+      }
+      else {
+        proceed();
+      }
     }
   })
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/26133511/ambari-web/app/templates/main/admin/highAvailability/nameNode/step1.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/nameNode/step1.hbs b/ambari-web/app/templates/main/admin/highAvailability/nameNode/step1.hbs
index 2f03ce3..0b46b12 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/nameNode/step1.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/nameNode/step1.hbs
@@ -22,6 +22,9 @@
     {{t admin.highAvailability.wizard.step1.body}}
     <div class="alert alert-warn">
       {{t admin.highAvailability.wizard.step1.alert}}
+      {{#if controller.isHawqInstalled}}
+        {{{t admin.highAvailability.wizard.step1.hawq.alert}}}
+      {{/if}}
     </div>
   </div>
 


Mime
View raw message