Repository: ambari
Updated Branches:
  refs/heads/trunk 40c914d8c -> d4b0b31f8


AMBARI-6134. Modify ambari-server setup help text for --jdbc-* 
options.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: d4b0b31f89033585f5dcb144db10847825b7206f
Parents: 40c914d
Author: Vitaly Brodetskyi <vbrodets...@hortonworks.com>
Authored: Mon Jun 16 09:46:13 2014 +0300
Committer: Vitaly Brodetskyi <vbrodets...@hortonworks.com>
Committed: Mon Jun 16 09:46:29 2014 +0300

----------------------------------------------------------------------
 ambari-server/src/main/python/ambari-server.py              | 9 +++++----
 .../src/main/resources/custom_actions/check_host.py         | 4 ++--
 .../HDP/1.3.2/services/HIVE/package/scripts/params.py       | 2 +-
 .../HDP/2.0.6/services/HIVE/package/scripts/params.py       | 2 +-
 ambari-server/src/test/python/TestAmbariServer.py           | 6 +++---
 5 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d4b0b31f/ambari-server/src/main/python/ambari-server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari-server.py 
b/ambari-server/src/main/python/ambari-server.py
index 966d3ea..ca67d98 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -366,7 +366,7 @@ ORACLE_UPGRADE_STACK_ARGS = "-S -L 
'{0}/{1}@(description=(address=(protocol=TCP)
 
 JDBC_PATTERNS = {"oracle": "*ojdbc*.jar", "mysql": "*mysql*.jar"}
 DATABASE_FULL_NAMES = {"oracle": "Oracle", "mysql": "MySQL", "postgres": 
"PostgreSQL"}
-JDBC_DB_OPTION_VALUES = ["postgresql", "mysql", "oracle"]
+JDBC_DB_OPTION_VALUES = ["postgres", "mysql", "oracle"]
 JDBC_DB_DEFAULT_DRIVER = {"postgresql" : "postgresql-jdbc.jar", "mysql" : 
"mysql-connector-java.jar", "oracle" : "ojdbc6.jar"}
 ORACLE_DB_ID_TYPES = ["Service Name", "SID"]
 
@@ -4174,10 +4174,11 @@ def main():
   parser.add_option('--databasepassword', default=None, help="Database user 
password", dest="database_password")
   parser.add_option('--sidorsname', default="sname", help="Oracle database 
identifier type, Service ID/Service "
                                                          "Name sid|sname", 
dest="sid_or_sname")
-  parser.add_option('--jdbc-driver', default=None, help="Path to jdbc driver. 
Used only in pair with --jdbc-db ",
+  parser.add_option('--jdbc-driver', default=None, help="Specifies the path to 
the JDBC driver JAR file for the " \
+                            "database type specified with the --jdbc-db 
option. Used only with --jdbc-db option.",
                     dest="jdbc_driver")
-  parser.add_option('--jdbc-db', default=None, help="Database name 
[postgresql/mysql/oracle]. Used only in pair with " \
-                    "--jdbc-driver", dest="jdbc_db")
+  parser.add_option('--jdbc-db', default=None, help="Specifies the database 
type [postgres|mysql|oracle] for the " \
+            "JDBC driver specified with the --jdbc-driver option. Used only 
with --jdbc-driver option.", dest="jdbc_db")
   (options, args) = parser.parse_args()
 
   # set verbose

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4b0b31f/ambari-server/src/main/resources/custom_actions/check_host.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/custom_actions/check_host.py 
b/ambari-server/src/main/resources/custom_actions/check_host.py
index c88b04d..7c6b299 100644
--- a/ambari-server/src/main/resources/custom_actions/check_host.py
+++ b/ambari-server/src/main/resources/custom_actions/check_host.py
@@ -32,7 +32,7 @@ CHECK_HOST_RESOLUTION = "host_resolution_check"
 
 DB_MYSQL = "mysql"
 DB_ORACLE = "oracle"
-DB_POSTGRESQL = "postgresql"
+DB_POSTGRESQL = "postgres"
 
 JDBC_DRIVER_MYSQL = "com.mysql.jdbc.Driver"
 JDBC_DRIVER_ORACLE = "oracle.jdbc.driver.OracleDriver"
@@ -40,7 +40,7 @@ JDBC_DRIVER_POSTGRESQL = "org.postgresql.Driver"
 
 JDBC_DRIVER_SYMLINK_MYSQL = "mysql-jdbc-driver.jar"
 JDBC_DRIVER_SYMLINK_ORACLE = "oracle-jdbc-driver.jar"
-JDBC_DRIVER_SYMLINK_POSTGRESQL = "postgresql-jdbc-driver.jar"
+JDBC_DRIVER_SYMLINK_POSTGRESQL = "postgres-jdbc-driver.jar"
 
 
 class CheckHost(Script):

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4b0b31f/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/params.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/params.py
 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/params.py
index 0f618b8..7453ed4 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/params.py
@@ -40,7 +40,7 @@ if hive_jdbc_driver == "com.mysql.jdbc.Driver":
   jdbc_symlink_name = "mysql-jdbc-driver.jar"
 elif hive_jdbc_driver == "org.postgresql.Driver":
   jdbc_jar_name = "postgresql-jdbc.jar"
-  jdbc_symlink_name = "postgresql-jdbc-driver.jar"
+  jdbc_symlink_name = "postgres-jdbc-driver.jar"
 elif hive_jdbc_driver == "oracle.jdbc.driver.OracleDriver":
   jdbc_jar_name = "ojdbc6.jar"
   jdbc_symlink_name = "oracle-jdbc-driver.jar"

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4b0b31f/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 f953267..dc3fbb6 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
@@ -41,7 +41,7 @@ if hive_jdbc_driver == "com.mysql.jdbc.Driver":
   jdbc_symlink_name = "mysql-jdbc-driver.jar"
 elif hive_jdbc_driver == "org.postgresql.Driver":
   jdbc_jar_name = "postgresql-jdbc.jar"
-  jdbc_symlink_name = "postgresql-jdbc-driver.jar"
+  jdbc_symlink_name = "postgres-jdbc-driver.jar"
 elif hive_jdbc_driver == "oracle.jdbc.driver.OracleDriver":
   jdbc_jar_name = "ojdbc6.jar"
   jdbc_symlink_name = "oracle-jdbc-driver.jar"

http://git-wip-us.apache.org/repos/asf/ambari/blob/d4b0b31f/ambari-server/src/test/python/TestAmbariServer.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/TestAmbariServer.py 
b/ambari-server/src/test/python/TestAmbariServer.py
index e7563e2..45f9a12 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -2395,7 +2395,7 @@ 
MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
 
     # test not run setup if ambari-server setup executed with jdbc properties
     reset_mocks()
-    is_server_runing_mock.return_value = (True, 0)
+    is_server_runing_mock.return_value = (False, 1)
     args.jdbc_driver= "path/to/driver"
     args.jdbc_db = "test_db_name"
 
@@ -3070,7 +3070,7 @@ 
MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
 
     # test copy jdbc failed and symlink exists
     lexists_mock.return_value = True
-    args.jdbc_db = "postgresql"
+    args.jdbc_db = "postgres"
     get_ambari_properties_mock.return_value = MagicMock()
     isfile_mock.side_effect = [True, False]
     fail = False
@@ -3103,7 +3103,7 @@ 
MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
     self.assertTrue(os_symlink_mock.called)
     self.assertTrue(copy_mock.called)
     self.assertEquals(os_symlink_mock.call_args_list[0][0][0], 
os.path.join("somewhere","test jdbc"))
-    self.assertEquals(os_symlink_mock.call_args_list[0][0][1], 
os.path.join("somewhere","postgresql-jdbc-driver.jar"))
+    self.assertEquals(os_symlink_mock.call_args_list[0][0][1], 
os.path.join("somewhere","postgres-jdbc-driver.jar"))
 
 
 

Reply via email to