ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject ambari git commit: AMBARI-8296. Oozie service check fails after lzo enabling (dsen via dlysnichenko)
Date Wed, 12 Nov 2014 19:43:54 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 5567b34ee -> 252e94c63


AMBARI-8296. Oozie service check fails after lzo enabling (dsen via dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 252e94c63a3a6b40079915c56e4ec405a99979bf
Parents: 5567b34
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Wed Nov 12 21:42:16 2014 +0200
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Wed Nov 12 21:43:39 2014 +0200

----------------------------------------------------------------------
 .../services/OOZIE/package/scripts/oozie.py     |  4 +++
 .../services/OOZIE/package/scripts/params.py    | 29 ++++++++++++++++++--
 2 files changed, 30 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/252e94c6/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
index 52f975c..bab1d78 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
@@ -145,6 +145,10 @@ def oozie_server_specific():
   #falcon el extension
   if params.has_falcon_host:
     cmd3 += format(' && cp {falcon_home}/oozie/ext/falcon-oozie-el-extension-*.jar
{oozie_libext_dir}')
+  if params.lzo_enabled:
+    Package(params.lzo_packages_for_current_host)
+
+    cmd3 += format(' && cp {hadoop_lib_home}/hadoop-lzo*.jar {oozie_lib_dir}')
   # this is different for HDP1
   cmd4 = format("cd {oozie_tmp_dir} && {oozie_setup_sh} prepare-war")
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/252e94c6/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
index afcd0cb..71d1492 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
@@ -21,14 +21,15 @@ limitations under the License.
 from resource_management.libraries.functions.version import format_hdp_stack_version, compare_versions
 from resource_management import *
 import status_params
+import itertools
 import os
 
 # server configurations
 config = Script.get_config()
 tmp_dir = Script.get_tmp_dir()
 
-hdp_stack_version = str(config['hostLevelParams']['stack_version'])
-hdp_stack_version = format_hdp_stack_version(hdp_stack_version)
+stack_version_unformatted = str(config['hostLevelParams']['stack_version'])
+hdp_stack_version = format_hdp_stack_version(stack_version_unformatted)
 stack_is_hdp22_or_further = hdp_stack_version != "" and compare_versions(hdp_stack_version,
'2.2') >= 0
 
 #hadoop params
@@ -132,7 +133,6 @@ oozie_hdfs_user_mode = 0775
 hdfs_user_keytab = config['configurations']['hadoop-env']['hdfs_user_keytab']
 hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
 hdfs_principal_name = config['configurations']['hadoop-env']['hdfs_principal_name']
-kinit_path_local = functions.get_kinit_path(["/usr/bin", "/usr/kerberos/bin", "/usr/sbin"])
 import functools
 #create partial functions with common arguments for every HdfsDirectory call
 #to create hdfs directory we need to call params.HdfsDirectory in code
@@ -145,3 +145,26 @@ HdfsDirectory = functools.partial(
   kinit_path_local = kinit_path_local,
   bin_dir = hadoop_bin_dir
 )
+
+#LZO support
+
+io_compression_codecs = config['configurations']['core-site']['io.compression.codecs']
+lzo_enabled = "com.hadoop.compression.lzo" in io_compression_codecs
+# stack_is_hdp22_or_further
+underscorred_version = stack_version_unformatted.replace('.', '_')
+dashed_version = stack_version_unformatted.replace('.', '-')
+lzo_packages_to_family = {
+  "any": ["hadoop-lzo"],
+  "redhat": ["lzo", "hadoop-lzo-native"],
+  "suse": ["lzo", "hadoop-lzo-native"],
+  "ubuntu": ["liblzo2-2"]
+}
+
+if stack_is_hdp22_or_further:
+  lzo_packages_to_family["redhat"] += [format("hadooplzo_{underscorred_version}_*")]
+  lzo_packages_to_family["suse"] += [format("hadooplzo_{underscorred_version}_*")]
+  lzo_packages_to_family["ubuntu"] += [format("hadooplzo_{dashed_version}_*")]
+
+lzo_packages_for_current_host = lzo_packages_to_family['any'] + lzo_packages_to_family[System.get_instance().os_family]
+all_lzo_packages = set(itertools.chain(*lzo_packages_to_family.values()))
+


Mime
View raw message