Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 f7ef0b37c -> ec846e180


AMBARI-22547 - History and Hive server start failed during IOP migration with 
AttributeError (jonathanhurley)


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

Branch: refs/heads/branch-2.6
Commit: ec846e18042dfe15d1035e4d1f24af2ed97a2679
Parents: f7ef0b3
Author: Jonathan Hurley <[email protected]>
Authored: Wed Nov 29 11:51:47 2017 -0500
Committer: Jonathan Hurley <[email protected]>
Committed: Wed Nov 29 15:55:45 2017 -0500

----------------------------------------------------------------------
 .../libraries/functions/copy_tarball.py                   | 10 ++++++++--
 .../YARN/2.1.0.2.0/package/scripts/params_linux.py        |  4 ++--
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ec846e18/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
index bd1cede..33620a3 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/copy_tarball.py
@@ -90,8 +90,14 @@ def _prepare_tez_tarball():
   # if enabled, LZO GPL libraries must be copied as well
   if lzo_utils.should_install_lzo():
     stack_root = Script.get_stack_root()
-    tez_version = component_version.get_component_repository_version("TEZ")
-    hadoop_lib_native_lzo_dir = os.path.join(stack_root, tez_version, 
"hadoop", "lib", "native")
+    service_version = 
component_version.get_component_repository_version(service_name = "TEZ")
+
+    # some installations might not have Tez, but MapReduce2 should be a 
fallback to get the LZO libraries from
+    if service_version is None:
+      Logger.warning("Tez does not appear to be installed, using the MapReduce 
version to get the LZO libraries")
+      service_version = 
component_version.get_component_repository_version(service_name = "MAPREDUCE2")
+
+    hadoop_lib_native_lzo_dir = os.path.join(stack_root, service_version, 
"hadoop", "lib", "native")
 
     if not sudo.path_isdir(hadoop_lib_native_lzo_dir):
       Logger.warning("Unable to located native LZO libraries at {0}, falling 
back to hadoop home".format(hadoop_lib_native_lzo_dir))

http://git-wip-us.apache.org/repos/asf/ambari/blob/ec846e18/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
index 2871dc0..9814145 100644
--- 
a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
@@ -87,8 +87,8 @@ version = default("/commandParams/version", None)
 # these are used to render the classpath for picking up Spark classes
 # in the event that spark is not installed, then we must default to the 
vesrion of YARN installed
 # since it will still load classes from its own spark version
-spark_version = component_version.get_component_repository_version("SPARK", 
"SPARK_CLIENT", default_value = version)
-spark2_version = component_version.get_component_repository_version("SPARK2", 
"SPARK2_CLIENT", default_value = version)
+spark_version = 
component_version.get_component_repository_version(service_name =  "SPARK", 
component_name = "SPARK_CLIENT", default_value = version)
+spark2_version = 
component_version.get_component_repository_version(service_name = "SPARK2", 
component_name = "SPARK2_CLIENT", default_value = version)
 
 stack_supports_ranger_kerberos = 
check_stack_feature(StackFeature.RANGER_KERBEROS_SUPPORT, 
version_for_stack_feature_checks)
 stack_supports_ranger_audit_db = 
check_stack_feature(StackFeature.RANGER_AUDIT_DB_SUPPORT, 
version_for_stack_feature_checks)

Reply via email to