AMBARI-3225. Make ZooKeeper a dependency on HDFS to ensure that NameNode HA can be enabled later on. (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/79af31fc Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/79af31fc Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/79af31fc Branch: refs/heads/trunk Commit: 79af31fcb157e6bf001413b09adce4f83ad39215 Parents: 4304564 Author: Oleg Nechiporenko <[email protected]> Authored: Fri Sep 13 18:05:40 2013 +0300 Committer: Oleg Nechiporenko <[email protected]> Committed: Mon Sep 16 12:16:33 2013 +0300 ---------------------------------------------------------------------- .../app/controllers/wizard/step4_controller.js | 24 ++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/79af31fc/ambari-web/app/controllers/wizard/step4_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step4_controller.js b/ambari-web/app/controllers/wizard/step4_controller.js index 4416ebd..1bf4a9a 100644 --- a/ambari-web/app/controllers/wizard/step4_controller.js +++ b/ambari-web/app/controllers/wizard/step4_controller.js @@ -118,7 +118,13 @@ App.WizardStep4Controller = Em.ArrayController.extend({ needToAddZooKeeper: function() { return this.needAddService('ZOOKEEPER', 'HBASE'); }, - + /** + * Check whether we should turn on <code>ZooKeeper</code> service (on 2.x stack) + * @returns {Boolean} + */ + needToAddZooKeeperOnStack2x: function() { + return this.findProperty('serviceName', 'ZOOKEEPER') && this.findProperty('serviceName', 'ZOOKEEPER').get('isSelected') === false; + }, /** * Check whether we should turn on <code>HDFS or HCFS</code> service * @return {Boolean} @@ -173,7 +179,7 @@ App.WizardStep4Controller = Em.ArrayController.extend({ this.mapReduce2CheckPopup(); } else { - if (this.needToAddZooKeeper()) { + if ((!App.get('isHadoop2Stack') && this.needToAddZooKeeper()) || (App.get('isHadoop2Stack') && this.needToAddZooKeeperOnStack2x())) { this.zooKeeperCheckPopup(); } else { @@ -190,13 +196,6 @@ App.WizardStep4Controller = Em.ArrayController.extend({ } }, - multipleDFSPopup: function() { - var services = [ - {serviceName: 'HDFS', selected: true}, - {serviceName: 'HCFS', selected: false} - ]; - this.needToAddServicePopup(services, 'multipleDFS'); - }, /** * Select/deselect services * @param services array of objects @@ -232,6 +231,13 @@ App.WizardStep4Controller = Em.ArrayController.extend({ }); }, + multipleDFSPopup: function() { + var services = [ + {serviceName: 'HDFS', selected: true}, + {serviceName: 'HCFS', selected: false} + ]; + this.needToAddServicePopup(services, 'multipleDFS'); + }, needToAddHDFSPopup: function() { this.needToAddServicePopup({serviceName:'HDFS', selected: true}, 'hdfsCheck'); },
