Repository: ambari Updated Branches: refs/heads/branch-1.7.0 c9ce6072b -> d4e8b56a3
AMBARI-7825. Rolling Upgrades - hdfs:///apps/tez/tez.tar.gz needs to be versioned (alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d4e8b56a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d4e8b56a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d4e8b56a Branch: refs/heads/branch-1.7.0 Commit: d4e8b56a3848fd1e4e958ad7122f253e18b33df7 Parents: c9ce607 Author: Alejandro Fernandez <[email protected]> Authored: Mon Oct 20 20:05:42 2014 -0700 Committer: Alejandro Fernandez <[email protected]> Committed: Mon Oct 20 20:05:42 2014 -0700 ---------------------------------------------------------------------- .../libraries/functions/dynamic_variable_interpretation.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d4e8b56a/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py b/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py index dac524a..efe7e63 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/dynamic_variable_interpretation.py @@ -251,17 +251,18 @@ def __map_local_file_to_hdfs_file(tarball_prefix): :param tarball_prefix: Prefix of the tarball must be one of tez, hive, mr, pig :return: Using the source tarball file pattern, it finds the corresponding file in the local filesystem, and maps it to its corresponding location in HDFS, while substituting the dynamic variables like {{ hdp_stack_version }} - and {{ component_version }} + and {{ component_version }}. + On success, returns a string with the path of where the file should be on HDFS, otherwise, returns an empty string. """ import params if not hasattr(params, "rpm_version") or params.rpm_version is None: Logger.warning("cluster-env.xml does not have rpm_version") - return 1 + return "" component_tar_source_file, component_tar_destination_folder = __get_tar_source_and_dest_folder(tarball_prefix) if not component_tar_source_file or not component_tar_destination_folder: - return 1 + return "" source_file_pattern = __create_regex_pattern(component_tar_source_file, params.rpm_version) source_and_dest_pairs = __populate_source_and_dests(tarball_prefix, source_file_pattern, component_tar_destination_folder, params.rpm_version)
