ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbrodets...@apache.org
Subject ambari git commit: AMBARI-8883. Removing mysql-connector-java removes also a lot of hadoop packages.(vbrodetskyi)
Date Tue, 23 Dec 2014 14:24:51 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk e94d9403b -> 3029048b5


AMBARI-8883. Removing mysql-connector-java removes also a lot of hadoop packages.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 3029048b54ca3eed92ec2c60f288dd2105bc63d3
Parents: e94d940
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Tue Dec 23 16:06:42 2014 +0200
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Tue Dec 23 16:06:42 2014 +0200

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/scripts/mysql_server.py            | 3 ---
 .../common-services/HIVE/0.12.0.2.0/package/scripts/params.py  | 5 +++--
 .../src/main/resources/custom_actions/scripts/check_host.py    | 2 +-
 .../HDP/1.3.2/services/HIVE/package/scripts/mysql_server.py    | 3 ---
 .../stacks/HDP/1.3.2/services/HIVE/package/scripts/params.py   | 6 ++++--
 5 files changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3029048b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py
index c74dfe3..8f77c1c 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py
@@ -30,9 +30,6 @@ from mysql import mysql_configure
 class MysqlServer(Script):
   def install(self, env):
     import params
-    Package('mysql-connector-java', action = "remove")
-    if os.path.exists(params.mysql_jdbc_driver_jar):
-      File(params.mysql_jdbc_driver_jar, action = "delete")
     self.install_packages(env, exclude_packages=params.hive_exclude_packages)
     self.configure(env)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/3029048b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
index 98e2b5c..86f95b8 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
@@ -255,6 +255,7 @@ hive_authorization_enabled = config['configurations']['hive-site']['hive.securit
 
 mysql_jdbc_driver_jar = "/usr/share/java/mysql-connector-java.jar"
 hive_use_existing_db = hive_database.startswith('Existing')
+hive_exclude_packages = []
 
 # There are other packages that contain /usr/share/java/mysql-connector-java.jar (like libmysql-java),
 # trying to install mysql-connector-java upon them can cause packages to conflict.
@@ -263,8 +264,8 @@ if hive_use_existing_db:
 else:
   if 'role' in config and config['role'] != "MYSQL_SERVER":
     hive_exclude_packages = ['mysql','mysql-server']
-  else:
-    hive_exclude_packages = []
+  if os.path.exists(mysql_jdbc_driver_jar):
+    hive_exclude_packages.append('mysql-connector-java')
 
 ########################################################
 ########### WebHCat related params #####################

http://git-wip-us.apache.org/repos/asf/ambari/blob/3029048b/ambari-server/src/main/resources/custom_actions/scripts/check_host.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/custom_actions/scripts/check_host.py b/ambari-server/src/main/resources/custom_actions/scripts/check_host.py
index 7430ba1..10c0073 100644
--- a/ambari-server/src/main/resources/custom_actions/scripts/check_host.py
+++ b/ambari-server/src/main/resources/custom_actions/scripts/check_host.py
@@ -172,7 +172,7 @@ class CheckHost(Script):
     # download and install java if it doesn't exists
     if not os.path.isfile(java_exec):
       jdk_name = config['commandParams']['jdk_name']
-      jdk_url = "{}/{}".format(jdk_location, jdk_name)
+      jdk_url = "{0}/{1}".format(jdk_location, jdk_name)
       jdk_download_target = os.path.join(agent_cache_dir, jdk_name)
       java_dir = os.path.dirname(java64_home)
       try:

http://git-wip-us.apache.org/repos/asf/ambari/blob/3029048b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/mysql_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/mysql_server.py
b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/mysql_server.py
index 936d38f..1712964 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/mysql_server.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/HIVE/package/scripts/mysql_server.py
@@ -28,9 +28,6 @@ class MysqlServer(Script):
 
   def install(self, env):
     import params
-    Package('mysql-connector-java', action = "remove")
-    if os.path.exists(params.mysql_jdbc_driver_jar):
-      File(params.mysql_jdbc_driver_jar, action = "delete")
     self.install_packages(env, exclude_packages=params.hive_exclude_packages)
     self.configure(env)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/3029048b/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 ca5b003..b486331 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
@@ -20,6 +20,7 @@ limitations under the License.
 
 from resource_management import *
 import status_params
+import os
 
 # server configurations
 config = Script.get_config()
@@ -87,14 +88,15 @@ hive_use_existing_db = hive_database.startswith('Existing')
 
 
 mysql_jdbc_driver_jar = "/usr/share/java/mysql-connector-java.jar"
+hive_exclude_packages = []
 
 if hive_use_existing_db:
   hive_exclude_packages = ['mysql-connector-java','mysql','mysql-server']
 else:
   if 'role' in config and config['role'] != "MYSQL_SERVER":
     hive_exclude_packages = ['mysql','mysql-server']
-  else:
-    hive_exclude_packages = []
+  if os.path.exists(mysql_jdbc_driver_jar):
+    hive_exclude_packages.append('mysql-connector-java')
 
 #Starting hiveserver2
 start_hiveserver2_script = 'startHiveserver2.sh'


Mime
View raw message