You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/08/28 15:01:16 UTC
git commit: AMBARI-3046. NameNode HA Wizard: Reconfigure HBase in
final step. (akovalenko via yusaku)
Updated Branches:
refs/heads/trunk 017528d8c -> 08bcffd94
AMBARI-3046. NameNode HA Wizard: Reconfigure HBase in final step. (akovalenko 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/08bcffd9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/08bcffd9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/08bcffd9
Branch: refs/heads/trunk
Commit: 08bcffd94ba71a6551f8628e17eec90723787c2b
Parents: 017528d
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Wed Aug 28 15:59:54 2013 +0300
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Wed Aug 28 15:59:54 2013 +0300
----------------------------------------------------------------------
.../admin/highAvailability/step9_controller.js | 54 +++++++++++++++++++-
ambari-web/app/messages.js | 5 +-
ambari-web/app/utils/ajax.js | 5 ++
3 files changed, 61 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/08bcffd9/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 173dfa2..22d8ddc 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/step9_controller.js
@@ -22,7 +22,14 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont
name:"highAvailabilityWizardStep9Controller",
- commands: ['startSecondNameNode', 'installZKFC', 'startZKFC', 'startAllServices', 'deleteSNameNode'],
+ commands: ['startSecondNameNode', 'installZKFC', 'startZKFC', 'reconfigureHBase', 'startAllServices', 'deleteSNameNode'],
+
+ clearStep: function () {
+ this._super();
+ if (!App.Service.find().someProperty('serviceName', 'HBASE')) {
+ this.get('tasks').splice(this.get('tasks').findProperty('command', 'reconfigureHBase').get('id'), 1);
+ }
+ },
startSecondNameNode: function () {
var hostName = this.get('content.masterComponentHosts').findProperty('isAddNameNode', true).hostName;
@@ -48,6 +55,51 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont
this.startComponent('ZKFC', hostName);
},
+ reconfigureHBase: function () {
+ this.loadConfigsTags();
+ },
+
+ loadConfigsTags: function () {
+ App.ajax.send({
+ name: 'config.tags',
+ sender: this,
+ success: 'onLoadConfigsTags',
+ error: 'onTaskError'
+ });
+ },
+
+ onLoadConfigsTags: function (data) {
+ var hbaseSiteTag = data.Clusters.desired_configs['hbase-site'].tag;
+ App.ajax.send({
+ name: 'admin.high_availability.load_hbase_configs',
+ sender: this,
+ data: {
+ hbaseSiteTag: hbaseSiteTag
+ },
+ success: 'onLoadConfigs',
+ error: 'onTaskError'
+ });
+ },
+
+ onLoadConfigs: function (data) {
+ var hbaseSiteProperties = data.items.findProperty('type', 'hbase-site').properties;
+ var nameServiceId = this.get('content.nameServiceId');
+
+ //hbase-site configs changes
+ hbaseSiteProperties['hbase.rootdir'] = hbaseSiteProperties['hbase.rootdir'].replace(/\/\/[^\/]*/, '//' + nameServiceId);
+
+ App.ajax.send({
+ name: 'admin.high_availability.save_configs',
+ sender: this,
+ data: {
+ siteName: 'hbase-site',
+ properties: hbaseSiteProperties
+ },
+ success: 'onTaskCompleted',
+ error: 'onTaskError'
+ });
+ },
+
startAllServices: function () {
App.ajax.send({
name: 'admin.high_availability.start_all_services',
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/08bcffd9/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index cc82938..cd23c90 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -677,8 +677,9 @@ Em.I18n.translations = {
'admin.highAvailability.wizard.step9.task0.title':'Start Additional NameNode',
'admin.highAvailability.wizard.step9.task1.title':'Install Failover Controllers',
'admin.highAvailability.wizard.step9.task2.title':'Start Failover Controllers',
- 'admin.highAvailability.wizard.step9.task3.title':'Start All Services',
- 'admin.highAvailability.wizard.step9.task4.title':'Delete Secondary NameNode',
+ 'admin.highAvailability.wizard.step9.task3.title':'Reconfigure HBase',
+ 'admin.highAvailability.wizard.step9.task4.title':'Start All Services',
+ 'admin.highAvailability.wizard.step9.task5.title':'Delete Secondary NameNode',
'admin.highAvailability.wizard.step9.notice.completed':'"NameNode HA has been enabled successfully.',
'admin.highAvailability.wizard.step3.nn1':'Current NameNode is on {0}.',
http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/08bcffd9/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index 6a64feb..0a300c1 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -736,6 +736,11 @@ var urls = {
}
}
},
+ 'admin.high_availability.load_hbase_configs': {
+ 'real': '/clusters/{clusterName}/configurations?type=hbase-site&tag={hbaseSiteTag}',
+ 'mock': '',
+ 'type': 'GET'
+ },
'admin.high_availability.delete_snamenode': {
'real': '/clusters/{clusterName}/hosts/{hostName}/host_components/SECONDARY_NAMENODE',
'mock': '',