You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by su...@apache.org on 2014/05/15 22:11:57 UTC

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

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.


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a3ddafe
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a3ddafe
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a3ddafe

Branch: refs/heads/trunk
Commit: 0a3ddafe73ce31861a0f4566d7b44fbfb675d7e0
Parents: fde2cd1
Author: Subin <su...@apache.org>
Authored: Fri May 16 01:27:37 2014 +0530
Committer: Subin <su...@apache.org>
Committed: Fri May 16 01:40:38 2014 +0530

----------------------------------------------------------------------
 .../stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py | 3 ++-
 .../apache/ambari/server/upgrade/UpgradeCatalog160Test.java  | 4 +++-
 .../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 +-
 6 files changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0a3ddafe/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 96b0e45..5ab1753 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,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

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a3ddafe/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
index e0c97d2..c02b109 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
+++ b/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,

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a3ddafe/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 5ab5744..7cfdca7 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 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',

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a3ddafe/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 fdac02a..82e1013 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": "postgres",
+            "hive_database_type": "mysql",
             "oozie_database": "New Derby Database",
             "zk_pid_dir": "/var/run/zookeeper",
             "user_group": "hadoop",

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a3ddafe/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 8e76ef5..774cd2f 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": "postgres",
+            "hive_database_type": "mysql", 
             "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/0a3ddafe/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 b872e7c..e530966 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 = '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']);
         }