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-12913. Hive metastore or server will fail, if there is some time delay between their start.(vbrodetskyi)
Date Sat, 29 Aug 2015 09:58:20 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 7493d18dd -> 24d5ce920


AMBARI-12913. Hive metastore or server will fail, if there is some time delay between their
start.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 24d5ce92075d75a3ff812dc3e391c3c114160e5b
Parents: 7493d18
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Sat Aug 29 12:58:15 2015 +0300
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Sat Aug 29 12:58:15 2015 +0300

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/scripts/hive.py     |  2 +-
 .../OOZIE/4.0.0.2.0/package/scripts/oozie.py    | 35 ++++++++++----------
 .../stacks/2.0.6/HIVE/test_hive_server.py       |  2 +-
 3 files changed, 20 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/24d5ce92/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 3bb8f4d..f10cca1 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
@@ -246,7 +246,7 @@ def hive(name=None):
        content=Template("hive.conf.j2")
        )
 
-  if name == 'metastore' or name == 'hiveserver2':
+  if (name == 'metastore' or name == 'hiveserver2') and not os.path.exists(params.target):
     jdbc_connector()
 
   File(format("/usr/lib/ambari-agent/{check_db_connection_jar_name}"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/24d5ce92/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
index 5fd531a..3e90eb5 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
@@ -310,27 +310,28 @@ def download_database_library_if_needed(target_directory = None):
     # create the full path using the supplied target directory and the JDBC JAR
     target_jar_with_directory = target_directory + os.path.sep + params.jdbc_driver_jar
 
-  File(params.downloaded_custom_connector,
-    content = DownloadSource(params.driver_curl_source))
+  if not os.path.exists(target_jar_with_directory):
+    File(params.downloaded_custom_connector,
+      content = DownloadSource(params.driver_curl_source))
 
-  if params.sqla_db_used:
-    untar_sqla_type2_driver = ('tar', '-xvf', params.downloaded_custom_connector, '-C', params.tmp_dir)
+    if params.sqla_db_used:
+      untar_sqla_type2_driver = ('tar', '-xvf', params.downloaded_custom_connector, '-C',
params.tmp_dir)
 
-    Execute(untar_sqla_type2_driver, sudo = True)
+      Execute(untar_sqla_type2_driver, sudo = True)
 
-    Execute(as_sudo(['yes', '|', 'cp', params.jars_path_in_archive, params.oozie_libext_dir],
auto_escape=False),
-            path=["/bin", "/usr/bin/"])
+      Execute(as_sudo(['yes', '|', 'cp', params.jars_path_in_archive, params.oozie_libext_dir],
auto_escape=False),
+              path=["/bin", "/usr/bin/"])
 
-    Directory(params.jdbc_libs_dir,
-              recursive=True)
+      Directory(params.jdbc_libs_dir,
+                recursive=True)
 
-    Execute(as_sudo(['yes', '|', 'cp', params.libs_path_in_archive, params.jdbc_libs_dir],
auto_escape=False),
-            path=["/bin", "/usr/bin/"])
+      Execute(as_sudo(['yes', '|', 'cp', params.libs_path_in_archive, params.jdbc_libs_dir],
auto_escape=False),
+              path=["/bin", "/usr/bin/"])
 
-  else:
-    Execute(('cp', '--remove-destination', params.downloaded_custom_connector, target_jar_with_directory),
-      path=["/bin", "/usr/bin/"],
-      sudo = True)
+    else:
+      Execute(('cp', '--remove-destination', params.downloaded_custom_connector, target_jar_with_directory),
+        path=["/bin", "/usr/bin/"],
+        sudo = True)
 
-  File(target_jar_with_directory, owner = params.oozie_user,
-    group = params.user_group)
+    File(target_jar_with_directory, owner = params.oozie_user,
+      group = params.user_group)

http://git-wip-us.apache.org/repos/asf/ambari/blob/24d5ce92/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
index 7ca3d78..42477dd 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
@@ -694,7 +694,7 @@ From source with checksum 150f554beae04f76f814f59549dead8b"""
     )
 
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hive-server2', '2.2.1.0-2065'),
sudo=True,)
-    self.assertResourceCalledByIndex(33, 'Execute', 'hive --config /usr/hdp/current/hive-server2/conf/conf.server
--service hiveserver2 --deregister 1.2.1.2.3.0.0-2434',
+    self.assertResourceCalledByIndex(31, 'Execute', 'hive --config /usr/hdp/current/hive-server2/conf/conf.server
--service hiveserver2 --deregister 1.2.1.2.3.0.0-2434',
       path=['/bin:/usr/hdp/current/hive-server2/bin:/usr/hdp/current/hadoop-client/bin'],
       tries=1, user='hive')
 


Mime
View raw message