incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject git commit: AMBARI-3101. NameNode HA wizard: Save (persist) tag versions for updated configs
Date Thu, 05 Sep 2013 00:25:36 GMT
Updated Branches:
  refs/heads/trunk 73d493991 -> 422c5f890


AMBARI-3101. NameNode HA wizard: Save (persist) tag versions for updated configs


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

Branch: refs/heads/trunk
Commit: 422c5f89096dc0cab30b95b012d1616e3302b9e4
Parents: 73d4939
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Thu Sep 5 03:23:01 2013 +0300
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Thu Sep 5 03:23:01 2013 +0300

----------------------------------------------------------------------
 .../admin/highAvailability/progress_controller.js   |  2 +-
 .../main/admin/highAvailability/step5_controller.js | 14 ++++++++++++++
 .../main/admin/highAvailability/step9_controller.js | 16 +++++++++++++++-
 .../admin/highAvailability/wizard_controller.js     |  5 +++++
 ambari-web/app/utils/db.js                          |  6 ++++++
 5 files changed, 41 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/422c5f89/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js
b/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js
index 9bcca06..3f651ea 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/progress_controller.js
@@ -117,7 +117,7 @@ App.HighAvailabilityProgressPageController = Em.Controller.extend({
         this.set('status', 'COMPLETED');
         this.set('isSubmitDisabled', false);
       }
-    } else if (this.get('tasks').someProperty('status', 'FAILED')) {
+    } else if (this.get('tasks').someProperty('status', 'FAILED') || this.get('tasks').someProperty('status',
'TIMEDOUT') || this.get('tasks').someProperty('status', 'ABORTED')) {
       this.set('status', 'FAILED');
       this.get('tasks').findProperty('status', 'FAILED').set('showRetry', true);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/422c5f89/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js
index 9218765..c2ae52e 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/step5_controller.js
@@ -24,6 +24,9 @@ App.HighAvailabilityWizardStep5Controller = App.HighAvailabilityProgressPageCont
 
   commands: ['stopAllServices', 'installNameNode', 'installJournalNodes', 'startJournalNodes',
'disableSNameNode', 'reconfigureHDFS'],
 
+  hdfsSiteTag : "",
+  coreSiteTag : "",
+
   stopAllServices: function () {
     App.ajax.send({
       name: 'admin.high_availability.stop_all_services',
@@ -87,6 +90,8 @@ App.HighAvailabilityWizardStep5Controller = App.HighAvailabilityProgressPageCont
   onLoadConfigsTags: function (data) {
     var hdfsSiteTag = data.Clusters.desired_configs['hdfs-site'].tag;
     var coreSiteTag = data.Clusters.desired_configs['core-site'].tag;
+    this.set("hdfsSiteTag", {name : "hdfsSiteTag", value : hdfsSiteTag});
+    this.set("coreSiteTag", {name : "coreSiteTag", value : coreSiteTag});
     App.ajax.send({
       name: 'admin.high_availability.load_configs',
       sender: this,
@@ -157,6 +162,15 @@ App.HighAvailabilityWizardStep5Controller = App.HighAvailabilityProgressPageCont
     }
     var hostNames = this.get('content.masterComponentHosts').filterProperty('component',
'NAMENODE').mapProperty('hostName');
     this.createComponent('HDFS_CLIENT', hostNames);
+    //highAvailabilityWizardController
+    App.router.get(this.get('content.controllerName')).saveConfigTag(this.get("hdfsSiteTag"));
+    App.router.get(this.get('content.controllerName')).saveConfigTag(this.get("coreSiteTag"));
+    App.clusterStatus.setClusterStatus({
+      clusterName: this.get('content.cluster.name'),
+      clusterState: 'HIGH_AVAILABILITY_DEPLOY',
+      wizardControllerName: this.get('content.controllerName'),
+      localdb: App.db.data
+    });
   }
 });
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/422c5f89/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
index 22d8ddc..c7c0d72 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
@@ -24,6 +24,8 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont
 
   commands: ['startSecondNameNode', 'installZKFC', 'startZKFC', 'reconfigureHBase', 'startAllServices',
'deleteSNameNode'],
 
+  hbaseSiteTag: "",
+
   clearStep: function () {
     this._super();
     if (!App.Service.find().someProperty('serviceName', 'HBASE')) {
@@ -70,6 +72,7 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont
 
   onLoadConfigsTags: function (data) {
     var hbaseSiteTag = data.Clusters.desired_configs['hbase-site'].tag;
+    this.set("hbaseSiteTag", {name : "hbaseSiteTag", value : hbaseSiteTag});
     App.ajax.send({
       name: 'admin.high_availability.load_hbase_configs',
       sender: this,
@@ -95,11 +98,22 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont
         siteName: 'hbase-site',
         properties: hbaseSiteProperties
       },
-      success: 'onTaskCompleted',
+      success: 'saveConfigTag',
       error: 'onTaskError'
     });
   },
 
+  saveConfigTag: function () {
+    App.router.get(this.get('content.controllerName')).saveConfigTag(this.get("hbaseSiteTag"));
+    App.clusterStatus.setClusterStatus({
+      clusterName: this.get('content.cluster.name'),
+      clusterState: 'HIGH_AVAILABILITY_DEPLOY',
+      wizardControllerName: this.get('content.controllerName'),
+      localdb: App.db.data
+    });
+    this.onTaskCompleted();
+  },
+
   startAllServices: function () {
     App.ajax.send({
       name: 'admin.high_availability.start_all_services',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/422c5f89/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 e025a36..8adde25 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/wizard_controller.js
@@ -158,6 +158,11 @@ App.HighAvailabilityWizardController = App.WizardController.extend({
     this.set('content.tasksStatuses', statuses);
   },
 
+  saveConfigTag: function(tag){
+    App.db.setHighAvailabilityWizardConfigTag(tag);
+    this.set('content.'+[tag.name], tag.value);
+  },
+
   loadTasksStatuses: function(){
     var statuses = App.db.getHighAvailabilityWizardTasksStatuses();
     this.set('content.tasksStatuses', statuses);

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/422c5f89/ambari-web/app/utils/db.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/db.js b/ambari-web/app/utils/db.js
index b9ac072..0287aa0 100644
--- a/ambari-web/app/utils/db.js
+++ b/ambari-web/app/utils/db.js
@@ -350,6 +350,12 @@ App.db.setIsNameNodeHa = function (haStatus) {
   localStorage.setObject('ambari', App.db.data);
 };
 
+App.db.setHighAvailabilityWizardConfigTag = function (tag) {
+  App.db.data = localStorage.getObject('ambari');
+  App.db.data.HighAvailabilityWizard[tag.name] = tag.value;
+  localStorage.setObject('ambari', App.db.data);
+};
+
 App.db.setHighAvailabilityWizardTasksStatuses = function (tasksStatuses) {
   App.db.data = localStorage.getObject('ambari');
   App.db.data.HighAvailabilityWizard.tasksStatuses = tasksStatuses;


Mime
View raw message