浏览代码

Revert "Merge branch 'trunk' of https://git-wip-us.apache.org/repos/asf/ambari into test"

This reverts commit 28c249e5332515a8f98fe18de872380fc1f30faa, reversing
changes made to e7089d4c786e39b988e79eb1ed6d38cefa99891d.
Subin 11 年之前
父节点
当前提交
0a3ddafe73

+ 2 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py

@@ -114,7 +114,8 @@ mysql_host = config['clusterHostInfo']['hive_mysql_host']
 mysql_adduser_path = "/tmp/addMysqlUser.sh"
 
 ######## Metastore Schema
-if str(hdp_stack_version).startswith('2.1'):
+if str(hdp_stack_version).startswith('2.1') and \
+    config['configurations']['global']['hive_database'] == 'New MySQL Database':
   init_metastore_schema = True
 else:
   init_metastore_schema = False

+ 3 - 1
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java

@@ -148,7 +148,9 @@ public class UpgradeCatalog160Test {
       capture(restartRequiredColumnCapture));
 
     dbAccessor.addFKConstraint("hostgroup_configuration", "FK_hg_config_blueprint_name",
-        new String[]{"blueprint_name", "hostgroup_name"}, "hostgroup", new String[]{"blueprint_name", "name"}, true);
+        "blueprint_name", "hostgroup", "blueprint_name", true);
+    dbAccessor.addFKConstraint("hostgroup_configuration", "FK_hg_config_hostgroup_name",
+        "hostgroup_name", "hostgroup", "name", true);
   }
 
   private void setViewEntityConfigExpectations(DBAccessor dbAccessor,

+ 4 - 4
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 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('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('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 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('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('Directory', '/var/run/hive',
       owner = 'hive',

+ 1 - 1
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": "postgres",
+            "hive_database_type": "mysql",
             "oozie_database": "New Derby Database",
             "zk_pid_dir": "/var/run/zookeeper",
             "user_group": "hadoop",

+ 1 - 1
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": "postgres",
+            "hive_database_type": "mysql", 
             "zk_pid_dir": "/var/run/zookeeper", 
             "jobhistory_http_primary_name": "HTTP", 
             "namenode_primary_name": "nn", 

+ 1 - 1
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 = 'postgres';
+          hiveDbType.value = 'postgresql';
           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']);
         }