ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [2/2] ambari git commit: AMBARI-16683. Replace '*' to hdp version in lzo packages (aonishuk)
Date Mon, 16 May 2016 16:26:40 GMT
AMBARI-16683. Replace '*' to hdp version in lzo packages (aonishuk)


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

Branch: refs/heads/branch-2.4
Commit: 8fbedf2a74eb5f1a3e2a9277512d491025200e06
Parents: 148ea7e
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon May 16 19:23:51 2016 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon May 16 19:23:51 2016 +0300

----------------------------------------------------------------------
 .../libraries/functions/get_lzo_packages.py                  | 8 +++++---
 .../HDFS/2.1.0.2.0/package/scripts/install_params.py         | 3 ++-
 .../HDFS/2.1.0.2.0/package/scripts/params_linux.py           | 3 ++-
 .../OOZIE/4.0.0.2.0/package/scripts/params_linux.py          | 3 ++-
 4 files changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8fbedf2a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
index e189d62..29712e3 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/get_lzo_packages.py
@@ -26,16 +26,18 @@ from resource_management.libraries.functions.stack_features import check_stack_f
 from resource_management.libraries.functions import StackFeature
 
 # TODO: Make list of lzo packages stack driven
-def get_lzo_packages(stack_version_unformatted):
+def get_lzo_packages(stack_version_unformatted, current_stack_full_version):
   lzo_packages = []
- 
+  current_stack_full_version = current_stack_full_version.replace(".", "_")
+  current_stack_full_version = current_stack_full_version.replace("-", "_")
+
   if OSCheck.is_redhat_family() or OSCheck.is_suse_family():
     lzo_packages += ["lzo", "hadoop-lzo-native"]
   elif OSCheck.is_ubuntu_family():
     lzo_packages += ["liblzo2-2"]
 
   if stack_version_unformatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_unformatted):
-    lzo_packages += ["hadooplzo_*"]
+    lzo_packages += ["hadooplzo_" + current_stack_full_version, "hadooplzo_" + current_stack_full_version
+ "-native"]
   else:
     lzo_packages += ["hadoop-lzo"]
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8fbedf2a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/install_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/install_params.py
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/install_params.py
index fe488c3..18b1ac3 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/install_params.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/install_params.py
@@ -32,7 +32,8 @@ else:
   # The logic for LZO also exists in OOZIE's params.py
   io_compression_codecs = default("/configurations/core-site/io.compression.codecs", None)
   lzo_enabled = io_compression_codecs is not None and "com.hadoop.compression.lzo" in io_compression_codecs.lower()
-  lzo_packages = get_lzo_packages(stack_version_unformatted)
+  current_stack_full_version = default("/hostLevelParams/current_version", None)
+  lzo_packages = get_lzo_packages(stack_version_unformatted, current_stack_full_version)
 
   exclude_packages = []
   if not lzo_enabled:

http://git-wip-us.apache.org/repos/asf/ambari/blob/8fbedf2a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
index 784da9c..7019de0 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
@@ -363,7 +363,8 @@ HdfsResource = functools.partial(
 # The logic for LZO also exists in OOZIE's params.py
 io_compression_codecs = default("/configurations/core-site/io.compression.codecs", None)
 lzo_enabled = io_compression_codecs is not None and "com.hadoop.compression.lzo" in io_compression_codecs.lower()
-lzo_packages = get_lzo_packages(stack_version_unformatted)
+current_stack_full_version = default("/hostLevelParams/current_version", None)
+lzo_packages = get_lzo_packages(stack_version_unformatted, current_stack_full_version)
   
 name_node_params = default("/commandParams/namenode", None)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8fbedf2a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
index 75924c5..bd20471 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
@@ -285,4 +285,5 @@ is_webhdfs_enabled = config['configurations']['hdfs-site']['dfs.webhdfs.enabled'
 io_compression_codecs = default("/configurations/core-site/io.compression.codecs", None)
 lzo_enabled = io_compression_codecs is not None and "com.hadoop.compression.lzo" in io_compression_codecs.lower()
 
-all_lzo_packages = get_lzo_packages(stack_version_unformatted)
+current_stack_full_version = default("/hostLevelParams/current_version", None)
+all_lzo_packages = get_lzo_packages(stack_version_unformatted, current_stack_full_version)


Mime
View raw message