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/323ce7a7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/323ce7a7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/323ce7a7 Branch: refs/heads/branch-3.0-perf Commit: 323ce7a797a65f795382c815a4068ae4b1e94bbb Parents: 0d7f609 Author: Jonathan Hurley <jhur...@hortonworks.com> Authored: Wed Nov 29 11:51:47 2017 -0500 Committer: Jonathan Hurley <jhur...@hortonworks.com> Committed: Wed Nov 29 16:18:57 2017 -0500 ---------------------------------------------------------------------- .../libraries/functions/copy_tarball.py | 10 ++++++++-- .../YARN/2.1.0.2.0/package/scripts/params_linux.py | 4 ++-- .../YARN/3.0.0.3.0/package/scripts/params_linux.py | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/323ce7a7/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 c15fbd1..18800db 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/323ce7a7/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 b244af0..1bc01d4 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) http://git-wip-us.apache.org/repos/asf/ambari/blob/323ce7a7/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/params_linux.py index 372ae85..b8a5382 100644 --- a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.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)