You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2014/01/17 14:14:48 UTC
git commit: AMBARI-4330. Strange behaviour of moving NameNode after
enabling HA. (alexantonenko)
Updated Branches:
refs/heads/trunk 05d9a042f -> 2e22a2c33
AMBARI-4330. Strange behaviour of moving NameNode after enabling HA. (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2e22a2c3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2e22a2c3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2e22a2c3
Branch: refs/heads/trunk
Commit: 2e22a2c338db26d68cc768cbfcf6d68ba1fe3cb7
Parents: 05d9a04
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Jan 17 15:09:10 2014 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Jan 17 15:09:10 2014 +0200
----------------------------------------------------------------------
.../main/service/reassign/step2_controller.js | 11 +++++++++--
ambari-web/app/controllers/wizard/step5_controller.js | 11 ++---------
ambari-web/app/templates/wizard/step5.hbs | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/2e22a2c3/ambari-web/app/controllers/main/service/reassign/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/reassign/step2_controller.js b/ambari-web/app/controllers/main/service/reassign/step2_controller.js
index f8225dd..388c52f 100644
--- a/ambari-web/app/controllers/main/service/reassign/step2_controller.js
+++ b/ambari-web/app/controllers/main/service/reassign/step2_controller.js
@@ -21,10 +21,17 @@ var App = require('app');
App.ReassignMasterWizardStep2Controller = App.WizardStep5Controller.extend({
currentHostId: null,
+ showCurrentHost: true,
loadStep: function() {
this._super();
- this.rebalanceComponentHosts(this.get('content.reassign.component_name'));
+ if(this.get('content.reassign.component_name') == "NAMENODE" && !this.get('content.masterComponentHosts').findProperty('component', "SECONDARY_NAMENODE")){
+ this.set('showCurrentHost', false);
+ this.rebalanceComponentHosts('NAMENODE');
+ }else{
+ this.set('showCurrentHost', true);
+ this.rebalanceSingleComponentHosts(this.get('content.reassign.component_name'));
+ }
},
loadComponents: function () {
@@ -52,7 +59,7 @@ App.ReassignMasterWizardStep2Controller = App.WizardStep5Controller.extend({
return result;
},
- rebalanceComponentHosts:function (componentName) {
+ rebalanceSingleComponentHosts:function (componentName) {
var currentComponents = this.get("selectedServicesMasters").filterProperty("component_name", componentName),
componentHosts = currentComponents.mapProperty("selectedHost"),
availableComponentHosts = [],
http://git-wip-us.apache.org/repos/asf/ambari/blob/2e22a2c3/ambari-web/app/controllers/wizard/step5_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step5_controller.js b/ambari-web/app/controllers/wizard/step5_controller.js
index 247ec6c..d0623db 100644
--- a/ambari-web/app/controllers/wizard/step5_controller.js
+++ b/ambari-web/app/controllers/wizard/step5_controller.js
@@ -643,15 +643,8 @@ App.WizardStep5Controller = Em.Controller.extend({
currentComponents.forEach(function (item) {
preparedAvailableHosts = availableComponentHosts.slice(0);
- if (this.get('content.controllerName') != 'reassignMasterController') {
- preparedAvailableHosts.pushObject(this.get("hosts").findProperty("host_name", item.get("selectedHost")));
- } else {
- if(item.get("host_name") != this.get('content.currentHostId')) {
- preparedAvailableHosts.pushObject(this.get("hosts").findProperty("host_name", item.get("host_name")));
- }
- item.set("selectedHost", preparedAvailableHosts.objectAt(0).host_name);
- }
- preparedAvailableHosts.sort(this.sortHostsByName, this);
+ preparedAvailableHosts.pushObject(this.get("hosts").findProperty("host_name", item.get("selectedHost")))
+ preparedAvailableHosts.sort(this.sortHostsByConfig, this);
item.set("availableHosts", preparedAvailableHosts);
}, this);
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/2e22a2c3/ambari-web/app/templates/wizard/step5.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step5.hbs b/ambari-web/app/templates/wizard/step5.hbs
index 54b5090..41e90fa 100644
--- a/ambari-web/app/templates/wizard/step5.hbs
+++ b/ambari-web/app/templates/wizard/step5.hbs
@@ -27,7 +27,7 @@
<div class="assign-masters row-fluid">
<div class="select-hosts span7">
<div class="row-fluid">
- {{#if currentHostId}}
+ {{#if showCurrentHost}}
<div class="span12 control-group mlc">
<div class="row-fluid">
<div class="span4"><span class="pull-right control-label">{{t services.reassign.step2.currentHost}}</span></div>