ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject git commit: AMBARI-3549. NameNode HA Rollback: Create Step 2 (alexantonenko)
Date Fri, 18 Oct 2013 15:40:36 GMT
Updated Branches:
  refs/heads/trunk 58a3eac93 -> 647dc17ca


AMBARI-3549. NameNode HA Rollback: Create Step 2 (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 647dc17ca8e90cc1b67dfd49e1622cc100aeabfb
Parents: 58a3eac
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Fri Oct 18 18:37:08 2013 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Fri Oct 18 18:40:27 2013 +0300

----------------------------------------------------------------------
 .../admin/rollbackHA/rollback_wizard_controller.js  |  5 ++---
 .../main/admin/rollbackHA/step2_controller.js       | 16 ++++++++++++++--
 ambari-web/app/messages.js                          |  9 +++++++++
 ambari-web/app/routes/rollbackHA_routes.js          |  4 +++-
 .../app/templates/main/admin/rollbackHA/step2.hbs   | 10 ++++++----
 .../app/views/main/admin/rollbackHA/step2_view.js   | 14 ++++++++++----
 6 files changed, 44 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/647dc17c/ambari-web/app/controllers/main/admin/rollbackHA/rollback_wizard_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/rollbackHA/rollback_wizard_controller.js
b/ambari-web/app/controllers/main/admin/rollbackHA/rollback_wizard_controller.js
index 0eba4ba..3332127 100644
--- a/ambari-web/app/controllers/main/admin/rollbackHA/rollback_wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/rollbackHA/rollback_wizard_controller.js
@@ -38,7 +38,8 @@ App.RollbackHighAvailabilityWizardController = App.WizardController.extend({
     hdfsUser:"hdfs",
     nameServiceId: '',
     selectedAddNNHost : null,
-    selectedSNNHost : null
+    selectedSNNHost : null,
+    activeNNHost: null
   }),
 
   setCurrentStep: function (currentStep, completed) {
@@ -136,8 +137,6 @@ App.RollbackHighAvailabilityWizardController = App.WizardController.extend({
     switch (step) {
       case '3':
       case '2':
-        //this.loadServicesFromServer();
-        //this.loadMasterComponentHosts();
       case '1':
         this.loadSNNHost();
         this.loadAddNNHost();

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/647dc17c/ambari-web/app/controllers/main/admin/rollbackHA/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/rollbackHA/step2_controller.js b/ambari-web/app/controllers/main/admin/rollbackHA/step2_controller.js
index 2f46550..6aa8274 100644
--- a/ambari-web/app/controllers/main/admin/rollbackHA/step2_controller.js
+++ b/ambari-web/app/controllers/main/admin/rollbackHA/step2_controller.js
@@ -18,7 +18,19 @@
 
 var App = require('app');
 
-App.RollbackHighAvailabilityWizardStep2Controller = Em.Controller.extend({
-  name:"rollbackHighAvailabilityWizardStep2Controller"
+App.RollbackHighAvailabilityWizardStep2Controller = App.HighAvailabilityWizardStep4Controller.extend({
+  name:"rollbackHighAvailabilityWizardStep2Controller",
+
+  pullCheckPointStatus: function () {
+    var hostName = this.get('content.activeNNHost');
+    App.ajax.send({
+      name: 'admin.high_availability.getNnCheckPointStatus',
+      sender: this,
+      data: {
+        hostName: hostName
+      },
+      success: 'checkNnCheckPointStatus'
+    });
+  }
 });
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/647dc17c/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 47078cf..bd9db63 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -727,6 +727,15 @@ Em.I18n.translations = {
   'admin.highAvailability.rollback.task11.title':'Start All Services',
   'admin.highAvailability.rollback.notice.inProgress':'Please wait while the wizard reverts
back to the non-HA setup.',
 
+  'admin.highAvailability.rollback.step2.body':
+    '<ol>' +
+      '<li>Login to the NameNode host <b>{1}</b>.</li>' +
+      '<li>Put the NameNode in Safe Mode (read-only mode):' +
+      '<div class="code-snippet">sudo su -l {0} -c \'hdfs dfsadmin -safemode enter\'</div></li>'
+
+      '<li>Once in Safe Mode, create a Checkpoint:' +
+      '<div class="code-snippet">sudo su -l {0} -c \'hdfs dfsadmin -saveNamespace\'</div></li>'
+
+      '</ol>',
+
   'admin.highAvailability.wizard.step8.body':
     '<div class="alert alert-info">' +
     '<ol>' +

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/647dc17c/ambari-web/app/routes/rollbackHA_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/rollbackHA_routes.js b/ambari-web/app/routes/rollbackHA_routes.js
index e409fb0..1203c33 100644
--- a/ambari-web/app/routes/rollbackHA_routes.js
+++ b/ambari-web/app/routes/rollbackHA_routes.js
@@ -100,7 +100,9 @@ module.exports = Em.Route.extend({
       controller.setCurrentStep('2');
       controller.dataLoading().done(function () {
         controller.loadAllPriorSteps();
-        controller.connectOutlet('rollbackHighAvailabilityWizardStep2', controller.get('content'));
+        controller.usersLoading().done(function () {
+          controller.connectOutlet('rollbackHighAvailabilityWizardStep2', controller.get('content'));
+        });
       })
     },
     unroutePath: function () {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/647dc17c/ambari-web/app/templates/main/admin/rollbackHA/step2.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/rollbackHA/step2.hbs b/ambari-web/app/templates/main/admin/rollbackHA/step2.hbs
index 15ced54..10b14d1 100644
--- a/ambari-web/app/templates/main/admin/rollbackHA/step2.hbs
+++ b/ambari-web/app/templates/main/admin/rollbackHA/step2.hbs
@@ -17,9 +17,11 @@
 }}
 <div>
   <h2>{{t admin.rollbackHighAvailability.wizard.step2.header}}</h2>
-
-
-  <div class="btn-area">
-    <a {{bindAttr class=":btn controller.isNameServiceIdValid::disabled :btn-success :pull-right"}}
{{action next}}>{{t common.next}} &rarr;</a>
+  <div class="alert alert-info">
+      {{{view.step2BodyText}}}
   </div>
+   <div class="btn-area">
+      <a  {{bindAttr class=":btn :btn-success :pull-right"}} {{action next}}>{{t common.next}}
&rarr;</a>
+      <span class="pull-right btn-extra-info">{{view.nnCheckPointText}}</span>
+    </div>
 </div>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/647dc17c/ambari-web/app/views/main/admin/rollbackHA/step2_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/rollbackHA/step2_view.js b/ambari-web/app/views/main/admin/rollbackHA/step2_view.js
index fa659e6..c7e5574 100644
--- a/ambari-web/app/views/main/admin/rollbackHA/step2_view.js
+++ b/ambari-web/app/views/main/admin/rollbackHA/step2_view.js
@@ -19,12 +19,18 @@
 
 var App = require('app');
 
-App.RollbackHighAvailabilityWizardStep2View = Em.View.extend({
+App.RollbackHighAvailabilityWizardStep2View = App.HighAvailabilityWizardStep4View.extend({
 
   templateName: require('templates/main/admin/rollbackHA/step2'),
 
-  didInsertElement: function() {
-
-  }
+  step2BodyText: function () {
+    var activeNN = App.HostComponent.find().findProperty('displayNameAdvanced','Active NameNode');
+    if(!activeNN){
+      activeNN = App.HostComponent.find().findProperty('componentName','NAMENODE');
+    }
+    activeNN = activeNN.get('host.hostName');
+    this.get('controller.content').set('activeNNHost', activeNN);
+    return Em.I18n.t('admin.highAvailability.rollback.step2.body').format(this.get('controller.content.hdfsUser'),
activeNN);
+  }.property()
 
 });


Mime
View raw message