Repository: ambari Updated Branches: refs/heads/trunk a781a4a2e -> 27539cd09
AMBARI-5734 Ambari installation should run the hive schema script for Oracle and Postgres as Metastore DB (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/27539cd0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/27539cd0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/27539cd0 Branch: refs/heads/trunk Commit: 27539cd09c2080a9fe474736af15843f885a16bc Parents: a781a4a Author: Dmitry Sen <[email protected]> Authored: Thu May 15 20:48:12 2014 +0300 Committer: Dmitry Sen <[email protected]> Committed: Thu May 15 20:48:12 2014 +0300 ---------------------------------------------------------------------- .../stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py | 3 +-- .../src/test/python/stacks/2.1/HIVE/test_hive_metastore.py | 8 ++++---- .../src/test/python/stacks/2.1/configs/default.json | 2 +- .../src/test/python/stacks/2.1/configs/secured.json | 2 +- ambari-web/app/controllers/wizard/step8_controller.js | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/27539cd0/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py index 5ab1753..96b0e45 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py @@ -114,8 +114,7 @@ mysql_host = config['clusterHostInfo']['hive_mysql_host'] mysql_adduser_path = "/tmp/addMysqlUser.sh" ######## Metastore Schema -if str(hdp_stack_version).startswith('2.1') and \ - config['configurations']['global']['hive_database'] == 'New MySQL Database': +if str(hdp_stack_version).startswith('2.1'): init_metastore_schema = True else: init_metastore_schema = False http://git-wip-us.apache.org/repos/asf/ambari/blob/27539cd0/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py index 7cfdca7..5ab5744 100644 --- a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py +++ b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py @@ -139,8 +139,8 @@ class TestHiveMetastore(RMFTestCase): content = StaticFile('startMetastore.sh'), mode = 0755, ) - self.assertResourceCalled('Execute', "export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/lib/hive/bin/schematool -initSchema -dbType mysql -userName hive -passWord asd", - not_if = 'export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/lib/hive/bin/schematool -info -dbType mysql -userName hive -passWord asd', + self.assertResourceCalled('Execute', "export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/lib/hive/bin/schematool -initSchema -dbType postgres -userName hive -passWord asd", + not_if = 'export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/lib/hive/bin/schematool -info -dbType postgres -userName hive -passWord asd', ) self.assertResourceCalled('Directory', '/var/run/hive', owner = 'hive', @@ -207,8 +207,8 @@ class TestHiveMetastore(RMFTestCase): content = StaticFile('startMetastore.sh'), mode = 0755, ) - self.assertResourceCalled('Execute', "export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/lib/hive/bin/schematool -initSchema -dbType mysql -userName hive -passWord asd", - not_if = 'export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/lib/hive/bin/schematool -info -dbType mysql -userName hive -passWord asd', + self.assertResourceCalled('Execute', "export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/lib/hive/bin/schematool -initSchema -dbType postgres -userName hive -passWord asd", + not_if = 'export HIVE_CONF_DIR=/etc/hive/conf.server ; /usr/lib/hive/bin/schematool -info -dbType postgres -userName hive -passWord asd', ) self.assertResourceCalled('Directory', '/var/run/hive', owner = 'hive', http://git-wip-us.apache.org/repos/asf/ambari/blob/27539cd0/ambari-server/src/test/python/stacks/2.1/configs/default.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.1/configs/default.json b/ambari-server/src/test/python/stacks/2.1/configs/default.json index 82e1013..fdac02a 100644 --- a/ambari-server/src/test/python/stacks/2.1/configs/default.json +++ b/ambari-server/src/test/python/stacks/2.1/configs/default.json @@ -296,7 +296,7 @@ "oozie_jdbc_driver": "org.apache.derby.jdbc.EmbeddedDriver", "yarn_pid_dir_prefix": "/var/run/hadoop-yarn", "initLimit": "10", - "hive_database_type": "mysql", + "hive_database_type": "postgres", "oozie_database": "New Derby Database", "zk_pid_dir": "/var/run/zookeeper", "user_group": "hadoop", http://git-wip-us.apache.org/repos/asf/ambari/blob/27539cd0/ambari-server/src/test/python/stacks/2.1/configs/secured.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.1/configs/secured.json b/ambari-server/src/test/python/stacks/2.1/configs/secured.json index 774cd2f..8e76ef5 100644 --- a/ambari-server/src/test/python/stacks/2.1/configs/secured.json +++ b/ambari-server/src/test/python/stacks/2.1/configs/secured.json @@ -337,7 +337,7 @@ "namenode_opt_newsize": "200m", "yarn_pid_dir_prefix": "/var/run/hadoop-yarn", "initLimit": "10", - "hive_database_type": "mysql", + "hive_database_type": "postgres", "zk_pid_dir": "/var/run/zookeeper", "jobhistory_http_primary_name": "HTTP", "namenode_primary_name": "nn", http://git-wip-us.apache.org/repos/asf/ambari/blob/27539cd0/ambari-web/app/controllers/wizard/step8_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js index e530966..b872e7c 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizard/step8_controller.js @@ -272,7 +272,7 @@ App.WizardStep8Controller = Em.Controller.extend({ else { if (hiveDb.value === Em.I18n.t('services.service.config.hive.oozie.postgresql')) { globals.findProperty('name', 'hive_hostname').value = globals.findProperty('name', 'hive_existing_postgresql_host').value; - hiveDbType.value = 'postgresql'; + hiveDbType.value = 'postgres'; hive_properties = Em.A(['hive_ambari_host', 'hive_ambari_database', 'hive_existing_oracle_host', 'hive_existing_oracle_database', 'hive_existing_mysql_host', 'hive_existing_mysql_database']); }
