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-16938. Deploy: UI: Hive_metastore not started.(vbrodetskyi)
Date Mon, 30 May 2016 10:51:04 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 9b8ca7e9f -> 677302795


AMBARI-16938. Deploy: UI: Hive_metastore not started.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 677302795a77c680c82933148b229a18bdc21316
Parents: 9b8ca7e
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Mon May 30 13:47:45 2016 +0300
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Mon May 30 13:47:45 2016 +0300

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/scripts/hive.py               | 10 +++++-----
 .../HIVE/0.12.0.2.0/package/scripts/hive_interactive.py   |  2 +-
 .../HIVE/0.12.0.2.0/package/scripts/hive_metastore.py     |  2 +-
 .../HIVE/0.12.0.2.0/package/scripts/params_linux.py       |  2 ++
 4 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/67730279/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
index abb8469..ef0fd6b 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py
@@ -269,9 +269,9 @@ def hive(name=None):
 
   if name == 'metastore' or name == 'hiveserver2':
     if params.target_hive is not None and not os.path.exists(params.target_hive):
-      jdbc_connector(params.target_hive)
+      jdbc_connector(params.target_hive, params.hive_previous_jdbc_jar)
     if params.target_hive2 is not None and not os.path.exists(params.target_hive2):
-      jdbc_connector(params.target_hive2)
+      jdbc_connector(params.target_hive2, params.hive2_previous_jdbc_jar)
 
   File(format("/usr/lib/ambari-agent/{check_db_connection_jar_name}"),
        content = DownloadSource(format("{jdk_location}{check_db_connection_jar_name}")),
@@ -415,7 +415,7 @@ def fill_conf_dir(component_conf_dir):
     pass # if params.log4j_version == '1'
 
 
-def jdbc_connector(target):
+def jdbc_connector(target, hive_previous_jdbc_jar):
   """
   Shared by Hive Batch, Hive Metastore, and Hive Interactive
   :param target: Target of jdbc jar name, which could be for any of the components above.
@@ -430,8 +430,8 @@ def jdbc_connector(target):
       "no_proxy": format("{ambari_server_hostname}")
     }
 
-    if params.hive_previous_jdbc_jar and os.path.isfile(params.hive_previous_jdbc_jar):
-      File(params.hive_previous_jdbc_jar, action='delete')
+    if hive_previous_jdbc_jar and os.path.isfile(hive_previous_jdbc_jar):
+      File(hive_previous_jdbc_jar, action='delete')
 
     # TODO: should be removed after ranger_hive_plugin will not provide jdbc
     Execute(('rm', '-f', params.prepackaged_ojdbc_symlink),

http://git-wip-us.apache.org/repos/asf/ambari/blob/67730279/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
index 129dd80..14ba0f9 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_interactive.py
@@ -196,7 +196,7 @@ def hive_interactive(name=None):
        content=Template("hive.conf.j2"))
 
   if not os.path.exists(params.target_hive_interactive):
-    jdbc_connector(params.target_hive_interactive)
+    jdbc_connector(params.target_hive_interactive, params.hive_intaractive_previous_jdbc_jar)
 
   File(format("/usr/lib/ambari-agent/{check_db_connection_jar_name}"),
        content = DownloadSource(format("{jdk_location}{check_db_connection_jar_name}")),

http://git-wip-us.apache.org/repos/asf/ambari/blob/67730279/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
index 7554010..55cddd6 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py
@@ -199,7 +199,7 @@ class HiveMetastoreDefault(HiveMetastore):
 
       # download it if it does not exist
       if not os.path.exists(params.source_jdbc_file):
-        jdbc_connector(params.target_hive)
+        jdbc_connector(params.target_hive, params.hive_previous_jdbc_jar)
 
       target_directory_and_filename = os.path.join(target_directory, os.path.basename(params.source_jdbc_file))
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/67730279/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index 76a417d..4d85d4b 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -259,6 +259,7 @@ if not hive_use_existing_db:
 downloaded_custom_connector = format("{tmp_dir}/{jdbc_jar_name}")
 target_hive = format("{hive_lib}/{jdbc_jar_name}")
 target_hive2 = format("{hive_lib2}/{jdbc_jar_name}") if hive_lib2 is not None else None
+hive2_previous_jdbc_jar = format("{hive_lib2}/{hive_previous_jdbc_jar_name}") if hive_lib2
is not None else None
 driver_curl_source = format("{jdk_location}/{jdbc_jar_name}")
 
 if not (stack_version_formatted_major and check_stack_feature(StackFeature.ROLLING_UPGRADE,
stack_version_formatted_major)):
@@ -373,6 +374,7 @@ yarn_log_dir_prefix = config['configurations']['yarn-env']['yarn_log_dir_prefix'
 
 target_hive = format("{hive_lib}/{jdbc_jar_name}")
 target_hive_interactive = format("{hive_interactive_lib}/{jdbc_jar_name}")
+hive_intaractive_previous_jdbc_jar = format("{hive_interactive_lib}/{hive_previous_jdbc_jar_name}")
 jars_in_hive_lib = format("{hive_lib}/*.jar")
 
 start_hiveserver2_path = format("{tmp_dir}/start_hiveserver2_script")


Mime
View raw message