incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject git commit: AMBARI-2821. NameNode HA Wizard: "Initialize JournalNodes" page. (Antonenko Alexander via yusaku)
Date Tue, 06 Aug 2013 21:01:35 GMT
Updated Branches:
  refs/heads/trunk 938878647 -> 13ca404d3


AMBARI-2821. NameNode HA Wizard: "Initialize JournalNodes" page. (Antonenko Alexander via
yusaku)


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

Branch: refs/heads/trunk
Commit: 13ca404d3609b10bbfefb79317b95b1dba2dc493
Parents: 9388786
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Tue Aug 6 14:01:25 2013 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Tue Aug 6 14:01:25 2013 -0700

----------------------------------------------------------------------
 ambari-web/app/controllers.js                   |  1 +
 .../admin/highAvailability/step6_controller.js  | 28 +++++++++++++++
 .../admin/highAvailability/wizard_controller.js |  7 ++--
 .../controllers/main/admin/misc_controller.js   |  3 ++
 ambari-web/app/messages.js                      | 37 ++++++++++++--------
 .../app/routes/high_availability_routes.js      | 23 +++++++++++-
 .../main/admin/highAvailability/step4.hbs       |  2 +-
 .../main/admin/highAvailability/step6.hbs       | 27 ++++++++++++++
 .../main/admin/highAvailability/wizard.hbs      |  3 +-
 ambari-web/app/views.js                         |  1 +
 .../main/admin/highAvailability/step4_view.js   |  7 ++--
 .../main/admin/highAvailability/step6_view.js   | 31 ++++++++++++++++
 .../main/admin/highAvailability/wizard_view.js  |  4 +++
 13 files changed, 153 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/ambari-web/app/controllers.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers.js b/ambari-web/app/controllers.js
index ff38aaf..baa11f4 100644
--- a/ambari-web/app/controllers.js
+++ b/ambari-web/app/controllers.js
@@ -34,6 +34,7 @@ require('controllers/main/admin/highAvailability/step2_controller');
 require('controllers/main/admin/highAvailability/step3_controller');
 require('controllers/main/admin/highAvailability/step4_controller');
 require('controllers/main/admin/highAvailability/step5_controller');
+require('controllers/main/admin/highAvailability/step6_controller');
 require('controllers/main/admin/cluster');
 require('controllers/main/admin/stack_upgrade_controller');
 require('controllers/main/admin/user');

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/ambari-web/app/controllers/main/admin/highAvailability/step6_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/step6_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/step6_controller.js
new file mode 100644
index 0000000..84e3b44
--- /dev/null
+++ b/ambari-web/app/controllers/main/admin/highAvailability/step6_controller.js
@@ -0,0 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var App = require('app');
+
+require('controllers/main/admin/misc_controller');
+
+App.HighAvailabilityWizardStep6Controller = App.MainAdminMiscController.extend({
+
+  name:"highAvailabilityWizardStep6Controller"
+
+})
+

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js
index 6a79d39..7c5e5e6 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js
@@ -23,7 +23,7 @@ App.HighAvailabilityWizardController = App.WizardController.extend({
 
   name: 'highAvailabilityWizardController',
 
-  totalSteps: 5,
+  totalSteps: 6,
 
   /**
    * Used for hiding back button in wizard
@@ -36,7 +36,9 @@ App.HighAvailabilityWizardController = App.WizardController.extend({
     hosts: null,
     services: null,
     slaveComponentHosts: null,
-    masterComponentHosts: null
+    masterComponentHosts: null,
+    serviceName: 'MISC',
+    hdfsUser:"hdfs"
   }),
 
   /**
@@ -163,6 +165,7 @@ App.HighAvailabilityWizardController = App.WizardController.extend({
   loadAllPriorSteps: function () {
     var step = this.get('currentStep');
     switch (step) {
+      case '6':
       case '5':
       case '4':
       case '3':

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/ambari-web/app/controllers/main/admin/misc_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/misc_controller.js b/ambari-web/app/controllers/main/admin/misc_controller.js
index c2e040b..db594f6 100644
--- a/ambari-web/app/controllers/main/admin/misc_controller.js
+++ b/ambari-web/app/controllers/main/admin/misc_controller.js
@@ -73,6 +73,9 @@ App.MainAdminMiscController = App.MainServiceInfoConfigsController.extend({
     else {
       this.set('users', misc_configs);
     }
+    if(this.get("content.hdfsUser")){
+      this.get('content').set('hdfsUser', misc_configs.findProperty('name','hdfs_user').get("value"));
+    }
     this.set('dataIsLoaded', true);
   }
 });

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index e271f31..74321cd 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -645,7 +645,10 @@ Em.I18n.translations = {
   'admin.highAvailability.wizard.step2.header':'Select Hosts',
   'admin.highAvailability.wizard.step3.header':'Review',
   'admin.highAvailability.wizard.step4.header':'Create Checkpoint',
+  'admin.highAvailability.wizard.step4.bodyHeader':'Manual Steps Required: Create Checkpoint
on NameNode',
+  'admin.highAvailability.wizard.step6.bodyHeader':'Manual Steps Required: Initialize JournalNodes',
   'admin.highAvailability.wizard.step5.header':'Deploy',
+  'admin.highAvailability.wizard.step6.header':'Initialize JournalNodes',
 
   'admin.highAvailability.wizard.step5.notice':'Please wait while NameNode HA is being deployed.',
   'admin.highAvailability.wizard.step5.task0.title':'Stop all services',
@@ -660,25 +663,31 @@ Em.I18n.translations = {
   'admin.highAvailability.wizard.step3.sn':'Existing Secondary NameNode on {0} will be disabled.',
   'admin.highAvailability.wizard.step3.jn':'JournalNode will be installed on following hosts:',
   'admin.highAvailability.wizard.step4.ckNotCreated':'Checkpoint not created yet',
+  'admin.highAvailability.wizard.step6.jsNoInit':'JournalNodes not initialized yet',
 
+
+  'admin.highAvailability.wizard.step6.body':'Note: The following commands must be run as
the user {0} on {1} <br/>' +
+    '1. Initialize the JournalNodes by running: <br/>' +
+    '$ hdfs namenode -initializeSharedEdits<br/>' +
+    '2. You will be able to proceed to the next step once we detect that the JournalNodes
have been initialized successfuly.<br/>',
   'admin.highAvailability.wizard.step4.body':'Note: The following commands must be run as
the user {0} on {1} <br/>' +
-  '1. Put the NameNode in safe mode (read-only-mode) by running: <br/>' +
-  '$ hdfs dfsadmin -safemode enter <br/>' +
-  '2. Once NameNode is in Safe Mode, create a checkpoint by running: <br/>' +
-  '$ TDB COMMAND <br/>' +
-  '3. You will be able to proceed to the next step once we detect that the NameNode is in
Safe Mode and that the checkpoint has been created successfully.',
+    '1. Put the NameNode in safe mode (read-only-mode) by running: <br/>' +
+    '$ hdfs dfsadmin -safemode enter <br/>' +
+    '2. Once NameNode is in Safe Mode, create a checkpoint by running: <br/>' +
+    '$ TDB COMMAND <br/>' +
+    '3. You will be able to proceed to the next step once we detect that the NameNode is
in Safe Mode and that the checkpoint has been created successfully.',
   'admin.highAvailability.wizard.step3.body':'Confirm your host selection and click Deploy
to activate NameNode HA.',
   'admin.highAvailability.wizard.step2.body':'Select a host that will be running an additional
NameNode.<br/> In addition,' +
-  ' select 3 hosts that will be running JournalNodes to store NameNode edit logs in a fault
tolerant maner.',
+    ' select 3 hosts that will be running JournalNodes to store NameNode edit logs in a fault
tolerant maner.',
   'admin.highAvailability.wizard.step1.body':'We will walk you through enabling NameNode
HA with this wizard.<br/>' +
-  'In NameNode HA, you will be running one more NameNode in addition to the current NameNode.
 This allows for an ' +
-  'active-standby configuration that automatically fails over if the active NameNode fails.<br/>'
+
-  'Note that your current Secondary NameNode will be disabled.<br/>' +
-  'In addition, the NameNodes will be storing the edit logs on multiple JournalNodes for
fault tolerance.<br/>' +
-  'Once you make your host selection for NameNodes and JournalNodes and confirm your selection,
the wizard ' +
-  'will make necessary changes to enable NameNode HA.<br/>' +
-  'You will be prompted to run manual steps as needed.<br/>' +
-  'Let"s get started.',
+    'In NameNode HA, you will be running one more NameNode in addition to the current NameNode.
 This allows for an ' +
+    'active-standby configuration that automatically fails over if the active NameNode fails.<br/>'
+
+    'Note that your current Secondary NameNode will be disabled.<br/>' +
+    'In addition, the NameNodes will be storing the edit logs on multiple JournalNodes for
fault tolerance.<br/>' +
+    'Once you make your host selection for NameNodes and JournalNodes and confirm your selection,
the wizard ' +
+    'will make necessary changes to enable NameNode HA.<br/>' +
+    'You will be prompted to run manual steps as needed.<br/>' +
+    'Let"s get started.',
 
   'admin.security.title':'Kerberos Security has not been enabled on this cluster.',
   'admin.security.enabled': 'Kerberos security is enabled on the cluster',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/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 1d19646..bcb4ddf 100644
--- a/ambari-web/app/routes/high_availability_routes.js
+++ b/ambari-web/app/routes/high_availability_routes.js
@@ -131,6 +131,25 @@ module.exports = Em.Route.extend({
     back: function (router) {
       router.transitionTo('step4');
     },
+    next: function (router) {
+      router.transitionTo('step6');
+    }
+  }),
+
+  step6: Em.Route.extend({
+    route: '/step6',
+    connectOutlets: function (router) {
+      $('a.close').hide();
+      var controller = router.get('highAvailabilityWizardController');
+      controller.setCurrentStep('6');
+      controller.dataLoading().done(function () {
+        controller.loadAllPriorSteps();
+        controller.connectOutlet('highAvailabilityWizardStep6',  controller.get('content'));
+      })
+    },
+    back: function (router) {
+      router.transitionTo('step5');
+    },
     next: function (router) {}
   }),
 
@@ -142,5 +161,7 @@ module.exports = Em.Route.extend({
 
   gotoStep4: Em.Router.transitionTo('step4'),
 
-  gotoStep5: Em.Router.transitionTo('step5')
+  gotoStep5: Em.Router.transitionTo('step5'),
+
+  gotoStep6: Em.Router.transitionTo('step6')
 });

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/ambari-web/app/templates/main/admin/highAvailability/step4.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/step4.hbs b/ambari-web/app/templates/main/admin/highAvailability/step4.hbs
index a555437..d164ec4 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/step4.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/step4.hbs
@@ -16,7 +16,7 @@
 * limitations under the License.
 }}
 <div>
-  <h2>{{t admin.highAvailability.wizard.step4.header}}</h2>
+  <h2>{{t admin.highAvailability.wizard.step4.bodyHeader}}</h2>
   <p class="alert alert-info">
     {{{view.step4BodyText}}}
   </p>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/ambari-web/app/templates/main/admin/highAvailability/step6.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/step6.hbs b/ambari-web/app/templates/main/admin/highAvailability/step6.hbs
new file mode 100644
index 0000000..b04b599
--- /dev/null
+++ b/ambari-web/app/templates/main/admin/highAvailability/step6.hbs
@@ -0,0 +1,27 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+<div>
+  <h2>{{t admin.highAvailability.wizard.step6.bodyHeader}}</h2>
+  <p class="alert alert-info">
+    {{{view.step6BodyText}}}
+  </p>
+  <div class="btn-area">
+    <a class="btn btn-success pull-right" {{action next}}>{{t common.next}} &rarr;</a>
+    <span class="pull-right btn-extra-info">{{t admin.highAvailability.wizard.step6.jsNoInit}}</span>
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/ambari-web/app/templates/main/admin/highAvailability/wizard.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/wizard.hbs b/ambari-web/app/templates/main/admin/highAvailability/wizard.hbs
index b393620..2420613 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/wizard.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/wizard.hbs
@@ -29,7 +29,8 @@
               <li {{bindAttr class="isStep2:active view.isStep2Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep2 target="controller"}}>{{t admin.highAvailability.wizard.step2.header}}</a></li>
               <li {{bindAttr class="isStep3:active view.isStep3Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep3 target="controller"}}>{{t admin.highAvailability.wizard.step3.header}}</a></li>
               <li {{bindAttr class="isStep4:active view.isStep4Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep4 target="controller"}}>{{t admin.highAvailability.wizard.step4.header}}</a></li>
-              <li {{bindAttr class="isStep5:active view.isStep4Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep5 target="controller"}}>{{t admin.highAvailability.wizard.step5.header}}</a></li>
+              <li {{bindAttr class="isStep5:active view.isStep5Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep5 target="controller"}}>{{t admin.highAvailability.wizard.step5.header}}</a></li>
+              <li {{bindAttr class="isStep6:active view.isStep6Disabled:disabled"}}><a
href="javascript:void(null);"  {{action gotoStep6 target="controller"}}>{{t admin.highAvailability.wizard.step6.header}}</a></li>
             </ul>
           </div>
         </div>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/ambari-web/app/views.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views.js b/ambari-web/app/views.js
index c6eeb5d..e5192d5 100644
--- a/ambari-web/app/views.js
+++ b/ambari-web/app/views.js
@@ -60,6 +60,7 @@ require('views/main/admin/highAvailability/step2_view');
 require('views/main/admin/highAvailability/step3_view');
 require('views/main/admin/highAvailability/step4_view');
 require('views/main/admin/highAvailability/step5_view');
+require('views/main/admin/highAvailability/step6_view');
 require('views/main/admin/cluster');
 require('views/main/admin/misc_view');
 require('views/main/admin/stack_upgrade');

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/ambari-web/app/views/main/admin/highAvailability/step4_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/step4_view.js b/ambari-web/app/views/main/admin/highAvailability/step4_view.js
index 1f38920..6920241 100644
--- a/ambari-web/app/views/main/admin/highAvailability/step4_view.js
+++ b/ambari-web/app/views/main/admin/highAvailability/step4_view.js
@@ -23,10 +23,13 @@ App.HighAvailabilityWizardStep4View = Em.View.extend({
 
   templateName: require('templates/main/admin/highAvailability/step4'),
 
-  step4BodyText: function () {
+  didInsertElement: function() {
     this.get('controller').loadUsers();
+  },
+
+  step4BodyText: function () {
     var nN = this.get('controller.content.masterComponentHosts').findProperty('isCurNameNode',
true);
-    return Em.I18n.t('admin.highAvailability.wizard.step4.body').format("hdfs", nN.hostName);
+    return Em.I18n.t('admin.highAvailability.wizard.step4.body').format(this.get('controller.content.hdfsUser'),
nN.hostName);
   }.property('controller.content.masterComponentHosts')
 
 });

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/ambari-web/app/views/main/admin/highAvailability/step6_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/step6_view.js b/ambari-web/app/views/main/admin/highAvailability/step6_view.js
new file mode 100644
index 0000000..4ffe6d1
--- /dev/null
+++ b/ambari-web/app/views/main/admin/highAvailability/step6_view.js
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+var App = require('app');
+
+App.HighAvailabilityWizardStep6View = Em.View.extend({
+
+  templateName: require('templates/main/admin/highAvailability/step6'),
+
+  step6BodyText: function () {
+    var nN = this.get('controller.content.masterComponentHosts').findProperty('isCurNameNode',
true);
+    return Em.I18n.t('admin.highAvailability.wizard.step6.body').format(this.get('controller.content.hdfsUser'),
nN.hostName);
+  }.property('controller.content.masterComponentHosts')
+
+});

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/13ca404d/ambari-web/app/views/main/admin/highAvailability/wizard_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/highAvailability/wizard_view.js b/ambari-web/app/views/main/admin/highAvailability/wizard_view.js
index d1d4e85..c88d2f6 100644
--- a/ambari-web/app/views/main/admin/highAvailability/wizard_view.js
+++ b/ambari-web/app/views/main/admin/highAvailability/wizard_view.js
@@ -43,6 +43,10 @@ App.HighAvailabilityWizardView = Em.View.extend({
     return this.isStepDisabled(5);
   }.property('controller.isStepDisabled.@each.value').cacheable(),
 
+  isStep6Disabled: function () {
+    return this.isStepDisabled(6);
+  }.property('controller.isStepDisabled.@each.value').cacheable(),
+
   isStepDisabled: function (index) {
     return this.get('controller.isStepDisabled').findProperty('step', index).get('value');
   }


Mime
View raw message