ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alejan...@apache.org
Subject git commit: AMBARI-7825. Rolling Upgrades - hdfs:///apps/tez/tez.tar.gz needs to be versioned (alejandro)
Date Tue, 21 Oct 2014 03:04:28 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 4e8a6529b -> 65611067b


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/65611067
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/65611067
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/65611067

Branch: refs/heads/trunk
Commit: 65611067beb02185cfe1003f26c10fbd88e35f32
Parents: 4e8a652
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Mon Oct 20 19:10:08 2014 -0700
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Mon Oct 20 20:04:11 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/65611067/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)


Mime
View raw message