You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by di...@apache.org on 2016/02/29 16:31:28 UTC
ambari git commit: AMBARI-14472: Parameterize distro-specific stack
information for OOZIE (Juanjo Marron via dili)
Repository: ambari
Updated Branches:
refs/heads/AMBARI-13364 7a77bfe52 -> b3f886e13
AMBARI-14472: Parameterize distro-specific stack information for OOZIE (Juanjo Marron via dili)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b3f886e1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b3f886e1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b3f886e1
Branch: refs/heads/AMBARI-13364
Commit: b3f886e13daea3641a8942ef5046f738d9809d8d
Parents: 7a77bfe
Author: Di Li <di...@apache.org>
Authored: Mon Feb 29 10:30:41 2016 -0500
Committer: Di Li <di...@apache.org>
Committed: Mon Feb 29 10:30:41 2016 -0500
----------------------------------------------------------------------
.../package/alerts/alert_check_oozie_server.py | 10 ++++-
.../OOZIE/4.0.0.2.0/package/scripts/oozie.py | 6 +--
.../4.0.0.2.0/package/scripts/oozie_client.py | 7 ++--
.../4.0.0.2.0/package/scripts/oozie_server.py | 19 +++++----
.../package/scripts/oozie_server_upgrade.py | 32 +++++++-------
.../4.0.0.2.0/package/scripts/params_linux.py | 44 +++++++++++---------
.../4.0.0.2.0/package/scripts/params_windows.py | 2 +-
.../4.0.0.2.0/package/scripts/service_check.py | 3 +-
.../4.0.0.2.0/package/scripts/status_params.py | 9 ++--
.../HDP/2.0.6/configuration/cluster-env.xml | 15 +++++++
10 files changed, 88 insertions(+), 59 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b3f886e1/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
index 90851c8..83db163 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
@@ -26,10 +26,15 @@ from resource_management.core.resources import Execute
from resource_management.libraries.functions import format
from resource_management.libraries.functions import get_kinit_path
from resource_management.libraries.functions import get_klist_path
+from resource_management.libraries.script.script import Script
from ambari_commons.os_check import OSConst, OSCheck
from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
from urlparse import urlparse
+
+# server configurations
+config = Script.get_config()
+
RESULT_CODE_OK = 'OK'
RESULT_CODE_CRITICAL = 'CRITICAL'
RESULT_CODE_UNKNOWN = 'UNKNOWN'
@@ -45,7 +50,8 @@ KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY = '{{kerberos-env/executable_search_paths}}
OOZIE_URL_KEY = '{{oozie-site/oozie.base.url}}'
SECURITY_ENABLED = '{{cluster-env/security_enabled}}'
OOZIE_USER = '{{oozie-env/oozie_user}}'
-OOZIE_CONF_DIR = '/usr/hdp/current/oozie-server/conf'
+stack_dir = config['configurations']['cluster-env']['stack_dir']
+OOZIE_CONF_DIR = format('{stack_dir}/current/oozie-server/conf')
OOZIE_CONF_DIR_LEGACY = '/etc/oozie/conf'
OOZIE_HTTPS_PORT = '{{oozie-site/oozie.https.port}}'
OOZIE_ENV_CONTENT = '{{oozie-env/content}}'
@@ -152,7 +158,7 @@ def get_check_command(oozie_url, host_name, configurations, parameters, only_kin
finally:
kinit_lock.release()
- # oozie configuration directory uses a symlink when > HDP 2.2
+ # oozie configuration directory uses a symlink when stack_version > stack_version_ru_support
oozie_config_directory = OOZIE_CONF_DIR_LEGACY
if os.path.exists(OOZIE_CONF_DIR):
oozie_config_directory = OOZIE_CONF_DIR
http://git-wip-us.apache.org/repos/asf/ambari/blob/b3f886e1/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
index 7591bad..1eddc4a 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
@@ -147,7 +147,7 @@ def oozie(is_server=False):
owner=params.oozie_user
)
- if params.hdp_stack_version != "" and compare_versions(params.hdp_stack_version, '2.2') >= 0:
+ if params.stack_version_formatted != "" and compare_versions(params.stack_version_formatted, params.stack_version_ru_support) >= 0:
File(format("{params.conf_dir}/adminusers.txt"),
mode=0644,
group=params.user_group,
@@ -201,7 +201,7 @@ def oozie_ownership():
def prepare_war():
"""
Attempt to call prepare-war command if the marker file doesn't exist or its content doesn't equal the expected command.
- The marker file is stored in /usr/hdp/current/oozie-server/.prepare_war_cmd
+ The marker file is stored in <stack_dir>/current/oozie-server/.prepare_war_cmd
"""
import params
@@ -323,7 +323,7 @@ def oozie_server_specific():
mode = 0644,
)
- if params.hdp_stack_version != "" and compare_versions(params.hdp_stack_version, '2.2') >= 0:
+ if params.stack_version_formatted != "" and compare_versions(params.stack_version_formatted, params.stack_version_ru_support) >= 0:
# Create hive-site and tez-site configs for oozie
Directory(params.hive_conf_dir,
create_parents = True,
http://git-wip-us.apache.org/repos/asf/ambari/blob/b3f886e1/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py
index 2e29464..cbe88fd 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py
@@ -30,7 +30,8 @@ from oozie_service import oozie_service
class OozieClient(Script):
def get_stack_to_component(self):
- return {"HDP": "oozie-client"}
+ import params
+ return {params.stack_name: "oozie-client"}
def install(self, env):
self.install_packages(env)
@@ -52,8 +53,8 @@ class OozieClient(Script):
env.set_params(params)
# this function should not execute if the version can't be determined or
- # is not at least HDP 2.2.0.0
- if not params.version or compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') < 0:
+ # is not at least stack_version_ru_support
+ if not params.version or compare_versions(format_hdp_stack_version(params.version), params.stack_version_ru_support) < 0:
return
Logger.info("Executing Oozie Client Stack Upgrade pre-restart")
http://git-wip-us.apache.org/repos/asf/ambari/blob/b3f886e1/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
index b87e453..c261204 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server.py
@@ -47,7 +47,8 @@ from check_oozie_server_status import check_oozie_server_status
class OozieServer(Script):
def get_stack_to_component(self):
- return {"HDP": "oozie-server"}
+ import params
+ return {params.stack_name: "oozie-server"}
def install(self, env):
self.install_packages(env)
@@ -65,17 +66,17 @@ class OozieServer(Script):
if upgrade_type is not None and params.upgrade_direction == Direction.UPGRADE and params.version is not None:
Logger.info(format("Configuring Oozie during upgrade type: {upgrade_type}, direction: {params.upgrade_direction}, and version {params.version}"))
- if compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
- # In order for the "/usr/hdp/current/oozie-<client/server>" point to the new version of
+ if compare_versions(format_hdp_stack_version(params.version), params.stack_version_ru_support) >= 0:
+ # In order for the "<stack_dir>/current/oozie-<client/server>" point to the new version of
# oozie, we need to create the symlinks both for server and client.
# This is required as both need to be pointing to new installed oozie version.
- # Sets the symlink : eg: /usr/hdp/current/oozie-client -> /usr/hdp/2.3.x.y-<version>/oozie
+ # Sets the symlink : eg: <stack_dir>/current/oozie-client -> <stack_dir>/2.3.x.y-<version>/oozie
hdp_select.select("oozie-client", params.version)
- # Sets the symlink : eg: /usr/hdp/current/oozie-server -> /usr/hdp/2.3.x.y-<version>/oozie
+ # Sets the symlink : eg: <stack_dir>/current/oozie-server -> <stack_dir>/2.3.x.y-<version>/oozie
hdp_select.select("oozie-server", params.version)
- if compare_versions(format_hdp_stack_version(params.version), '2.3.0.0') >= 0:
+ if compare_versions(format_hdp_stack_version(params.version), params.stack_version_oozie_preconfiguration_support) >= 0:
conf_select.select(params.stack_name, "oozie", params.version)
env.set_params(params)
@@ -186,15 +187,15 @@ class OozieServerDefault(OozieServer):
env.set_params(params)
# this function should not execute if the version can't be determined or
- # is not at least HDP 2.2.0.0
- if not params.version or compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') < 0:
+ # is not at least stack_version_ru_support
+ if not params.version or compare_versions(format_hdp_stack_version(params.version), params.stack_version_ru_support) < 0:
return
Logger.info("Executing Oozie Server Stack Upgrade pre-restart")
OozieUpgrade.backup_configuration()
- if params.version and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
+ if params.version and compare_versions(format_hdp_stack_version(params.version), params.stack_version_ru_support) >= 0:
conf_select.select(params.stack_name, "oozie", params.version)
hdp_select.select("oozie-server", params.version)
http://git-wip-us.apache.org/repos/asf/ambari/blob/b3f886e1/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
index f0ebd20..2e4e1ab 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
@@ -99,31 +99,31 @@ class OozieUpgrade(Script):
def prepare_libext_directory():
"""
Performs the following actions on libext:
- - creates /usr/hdp/current/oozie/libext and recursively
+ - creates <stack_dir>/current/oozie/libext and recursively
- set 777 permissions on it and its parents.
- downloads JDBC driver JAR if needed
- copies Falcon JAR for the Oozie WAR if needed
"""
import params
- # some versions of HDP don't need the lzo compression libraries
+ # some stack versions might don't need the lzo compression libraries
target_version_needs_compression_libraries = compare_versions(
- format_hdp_stack_version(params.version), '2.2.1.0') >= 0
+ format_hdp_stack_version(params.version), params.stack_version_lzo_unsupport) >= 0
# ensure the directory exists
Directory(params.oozie_libext_dir, mode = 0777)
# get all hadooplzo* JAR files
# hdp-select set hadoop-client has not run yet, therefore we cannot use
- # /usr/hdp/current/hadoop-client ; we must use params.version directly
- # however, this only works when upgrading beyond 2.2.0.0; don't do this
- # for downgrade to 2.2.0.0 since hadoop-lzo will not be present
+ # <stack_dir>/current/hadoop-client ; we must use params.version directly
+ # however, this only works when upgrading beyond stack_version_ru_support; don't do this
+ # for downgrade to stack_version_ru_support since hadoop-lzo will not be present
# This can also be called during a Downgrade.
- # When a version is Intalled, it is responsible for downloading the hadoop-lzo packages
+ # When a version is installed, it is responsible for downloading the hadoop-lzo packages
# if lzo is enabled.
if params.lzo_enabled and (params.upgrade_direction == Direction.UPGRADE or target_version_needs_compression_libraries):
hadoop_lzo_pattern = 'hadoop-lzo*.jar'
- hadoop_client_new_lib_dir = format("/usr/hdp/{version}/hadoop/lib")
+ hadoop_client_new_lib_dir = format("{stack_dir}/{version}/hadoop/lib")
files = glob.iglob(os.path.join(hadoop_client_new_lib_dir, hadoop_lzo_pattern))
if not files:
@@ -143,10 +143,10 @@ class OozieUpgrade(Script):
hadoop_client_new_lib_dir, hadoop_lzo_pattern))
# copy ext ZIP to libext dir
- oozie_ext_zip_file = '/usr/share/HDP-oozie/ext-2.2.zip'
+ oozie_ext_zip_file = params.ext_js_path
- # something like /usr/hdp/current/oozie-server/libext/ext-2.2.zip
- oozie_ext_zip_target_path = os.path.join(params.oozie_libext_dir, "ext-2.2.zip")
+ # something like <stack_dir>/current/oozie-server/libext/ext-2.2.zip
+ oozie_ext_zip_target_path = os.path.join(params.oozie_libext_dir, params.ext_js_file)
if not os.path.isfile(oozie_ext_zip_file):
raise Fail("Unable to copy {0} because it does not exist".format(oozie_ext_zip_file))
@@ -172,7 +172,7 @@ class OozieUpgrade(Script):
# copy the Falcon JAR if needed; falcon has not upgraded yet, so we must
# use the versioned falcon directory
if params.has_falcon_host:
- versioned_falcon_jar_directory = "/usr/hdp/{0}/falcon/oozie/ext/falcon-oozie-el-extension-*.jar".format(stack_version)
+ versioned_falcon_jar_directory = "{0}/{1}/falcon/oozie/ext/falcon-oozie-el-extension-*.jar".format(params.stack_dir, stack_version)
Logger.info("Copying {0} to {1}".format(versioned_falcon_jar_directory, params.oozie_libext_dir))
Execute(format('{sudo} cp {versioned_falcon_jar_directory} {oozie_libext_dir}'))
@@ -238,10 +238,10 @@ class OozieUpgrade(Script):
# the database upgrade requires the db driver JAR, but since we have
# not yet run hdp-select to upgrade the current points, we have to use
# the versioned libext directory as the location[[-vufdtffr,
- versioned_libext_dir = "/usr/hdp/{0}/oozie/libext".format(stack_version)
+ versioned_libext_dir = "{0}/{1}/oozie/libext".format(params.stack_dir, stack_version)
oozie.download_database_library_if_needed(target_directory=versioned_libext_dir)
- database_upgrade_command = "/usr/hdp/{0}/oozie/bin/ooziedb.sh upgrade -run".format(stack_version)
+ database_upgrade_command = "{0}/{1}/oozie/bin/ooziedb.sh upgrade -run".format(params.stack_dir, stack_version)
Execute(database_upgrade_command, user=params.oozie_user, logoutput=True)
# install new sharelib to HDFS
@@ -285,8 +285,8 @@ class OozieUpgrade(Script):
stack_version = upgrade_stack[1]
# install new sharelib to HDFS
- sharelib_command = "/usr/hdp/{0}/oozie/bin/oozie-setup.sh sharelib create -fs {1}".format(
- stack_version, params.fs_root)
+ sharelib_command = "{0}/{1}/oozie/bin/oozie-setup.sh sharelib create -fs {2}".format(
+ params.stack_dir, stack_version, params.fs_root)
Execute(sharelib_command, user=params.oozie_user, logoutput=True)
http://git-wip-us.apache.org/repos/asf/ambari/blob/b3f886e1/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 7a2f6f6..e1b41ce 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
@@ -45,17 +45,22 @@ hostname = config["hostname"]
# New Cluster Stack Version that is defined during the RESTART of a Rolling Upgrade
version = default("/commandParams/version", None)
stack_name = default("/hostLevelParams/stack_name", None)
+stack_dir = config['configurations']['cluster-env']['stack_dir']
+stack_shared_dir = config['configurations']['cluster-env']['stack_shared_dir']
upgrade_direction = default("/commandParams/upgrade_direction", None)
stack_version_unformatted = str(config['hostLevelParams']['stack_version'])
-hdp_stack_version = format_hdp_stack_version(stack_version_unformatted)
+stack_version_formatted = format_hdp_stack_version(stack_version_unformatted)
+stack_version_ru_support = config['configurations']['cluster-env']['stack_version_ru_support']
+stack_version_lzo_unsupport = config['configurations']['cluster-env']['stack_version_lzo_unsupport']
+stack_version_oozie_preconfiguration_support = config['configurations']['cluster-env']['stack_version_oozie_preconfiguration_support']
hadoop_conf_dir = conf_select.get_hadoop_conf_dir()
hadoop_bin_dir = hdp_select.get_hadoop_dir("bin")
hadoop_lib_home = hdp_select.get_hadoop_dir("lib")
#hadoop params
-if Script.is_hdp_stack_greater_or_equal("2.2"):
+if Script.is_hdp_stack_greater_or_equal(stack_version_ru_support):
# something like 2.3.0.0-1234
stack_version = None
upgrade_stack = hdp_select._get_upgrade_stack()
@@ -65,25 +70,25 @@ if Script.is_hdp_stack_greater_or_equal("2.2"):
# oozie-server or oozie-client, depending on role
oozie_root = status_params.component_directory
- # using the correct oozie root dir, format the correct location
- oozie_lib_dir = format("/usr/hdp/current/{oozie_root}")
- oozie_setup_sh = format("/usr/hdp/current/{oozie_root}/bin/oozie-setup.sh")
- oozie_webapps_dir = format("/usr/hdp/current/{oozie_root}/oozie-server/webapps")
- oozie_webapps_conf_dir = format("/usr/hdp/current/{oozie_root}/oozie-server/conf")
- oozie_libext_dir = format("/usr/hdp/current/{oozie_root}/libext")
- oozie_server_dir = format("/usr/hdp/current/{oozie_root}/oozie-server")
- oozie_shared_lib = format("/usr/hdp/current/{oozie_root}/share")
- oozie_home = format("/usr/hdp/current/{oozie_root}")
- oozie_bin_dir = format("/usr/hdp/current/{oozie_root}/bin")
- oozie_examples_regex = format("/usr/hdp/current/{oozie_root}/doc")
+ # using the correct oozie stack root dir, format the correct location
+ oozie_lib_dir = format("{stack_dir}/current/{oozie_root}")
+ oozie_setup_sh = format("{stack_dir}/current/{oozie_root}/bin/oozie-setup.sh")
+ oozie_webapps_dir = format("{stack_dir}/current/{oozie_root}/oozie-server/webapps")
+ oozie_webapps_conf_dir = format("{stack_dir}/current/{oozie_root}/oozie-server/conf")
+ oozie_libext_dir = format("{stack_dir}/current/{oozie_root}/libext")
+ oozie_server_dir = format("{stack_dir}/current/{oozie_root}/oozie-server")
+ oozie_shared_lib = format("{stack_dir}/current/{oozie_root}/share")
+ oozie_home = format("{stack_dir}/current/{oozie_root}")
+ oozie_bin_dir = format("{stack_dir}/current/{oozie_root}/bin")
+ oozie_examples_regex = format("{stack_dir}/current/{oozie_root}/doc")
# set the falcon home for copying JARs; if in an upgrade, then use the version of falcon that
# matches the version of oozie
- falcon_home = '/usr/hdp/current/falcon-client'
+ falcon_home = format("{stack_dir}/current/falcon-client")
if stack_version is not None:
- falcon_home = '/usr/hdp/{0}/falcon'.format(stack_version)
+ falcon_home = '{0}/{1}/falcon'.format(stack_dir, stack_version)
- conf_dir = format("/usr/hdp/current/{oozie_root}/conf")
+ conf_dir = format("{stack_dir}/current/{oozie_root}/conf")
hive_conf_dir = format("{conf_dir}/action-conf/hive")
else:
@@ -120,9 +125,8 @@ oozie_pid_dir = status_params.oozie_pid_dir
pid_file = status_params.pid_file
hadoop_jar_location = "/usr/lib/hadoop/"
java_share_dir = "/usr/share/java"
-# for HDP1 it's "/usr/share/HDP-oozie/ext.zip"
ext_js_file = "ext-2.2.zip"
-ext_js_path = format("/usr/share/HDP-oozie/{ext_js_file}")
+ext_js_path = format("{stack_shared_dir}-oozie/{ext_js_file}")
security_enabled = config['configurations']['cluster-env']['security_enabled']
oozie_heapsize = config['configurations']['oozie-env']['oozie_heapsize']
oozie_permsize = config['configurations']['oozie-env']['oozie_permsize']
@@ -140,7 +144,7 @@ oozie_site = config['configurations']['oozie-site']
# Need this for yarn.nodemanager.recovery.dir in yarn-site
yarn_log_dir_prefix = config['configurations']['yarn-env']['yarn_log_dir_prefix']
-if security_enabled and Script.is_hdp_stack_less_than("2.2"):
+if security_enabled and Script.is_hdp_stack_less_than(stack_version_ru_support):
#older versions of oozie have problems when using _HOST in principal
oozie_site = dict(config['configurations']['oozie-site'])
oozie_site['oozie.service.HadoopAccessorService.kerberos.principal'] = \
@@ -191,7 +195,7 @@ if https_port is not None:
hdfs_site = config['configurations']['hdfs-site']
fs_root = config['configurations']['core-site']['fs.defaultFS']
-if Script.is_hdp_stack_less_than("2.2"):
+if Script.is_hdp_stack_less_than(stack_version_ru_support):
put_shared_lib_to_hdfs_cmd = format("hadoop --config {hadoop_conf_dir} dfs -put {oozie_shared_lib} {oozie_hdfs_user_dir}")
# for newer
else:
http://git-wip-us.apache.org/repos/asf/ambari/blob/b3f886e1/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_windows.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_windows.py
index ec404c4..1f939d4 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_windows.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_windows.py
@@ -24,7 +24,7 @@ from status_params import *
config = Script.get_config()
hadoop_user = config["configurations"]["cluster-env"]["hadoop.user.name"]
-hdp_root = os.path.abspath(os.path.join(os.environ["HADOOP_HOME"], ".."))
+stack_root = os.path.abspath(os.path.join(os.environ["HADOOP_HOME"], ".."))
oozie_root = os.environ['OOZIE_ROOT']
oozie_home = os.environ['OOZIE_HOME']
oozie_conf_dir = os.path.join(oozie_home,'conf')
http://git-wip-us.apache.org/repos/asf/ambari/blob/b3f886e1/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py
index f0cdb2c..11f924f 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/service_check.py
@@ -43,7 +43,6 @@ class OozieServiceCheckDefault(OozieServiceCheck):
import params
env.set_params(params)
- # on HDP1 this file is different
prepare_hdfs_file_name = 'prepareOozieHdfsDirectories.sh'
smoke_test_file_name = 'oozieSmoke2.sh'
@@ -130,7 +129,7 @@ class OozieServiceCheckWindows(OozieServiceCheck):
import params
env.set_params(params)
- smoke_cmd = os.path.join(params.hdp_root, "Run-SmokeTests.cmd")
+ smoke_cmd = os.path.join(params.stack_root, "Run-SmokeTests.cmd")
service = "OOZIE"
Execute(format("cmd /C {smoke_cmd} {service}"), logoutput=True)
http://git-wip-us.apache.org/repos/asf/ambari/blob/b3f886e1/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/status_params.py
index d575bd1..49ab02c 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/status_params.py
@@ -25,7 +25,7 @@ from resource_management.libraries.functions import get_kinit_path
from resource_management.libraries.script.script import Script
# a map of the Ambari role to the component name
-# for use with /usr/hdp/current/<component>
+# for use with <stack_dir>/current/<component>
SERVER_ROLE_DIRECTORY_MAP = {
'OOZIE_SERVER' : 'oozie-server',
'OOZIE_CLIENT' : 'oozie-client',
@@ -44,12 +44,15 @@ else:
oozie_pid_dir = config['configurations']['oozie-env']['oozie_pid_dir']
pid_file = format("{oozie_pid_dir}/oozie.pid")
+ stack_dir = config['configurations']['cluster-env']['stack_dir']
+ stack_version_ru_support = config['configurations']['cluster-env']['stack_version_ru_support']
+
security_enabled = config['configurations']['cluster-env']['security_enabled']
kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
conf_dir = "/etc/oozie/conf"
- if Script.is_hdp_stack_greater_or_equal("2.2"):
- conf_dir = format("/usr/hdp/current/{component_directory}/conf")
+ if Script.is_hdp_stack_greater_or_equal(stack_version_ru_support):
+ conf_dir = format("{stack_dir}/current/{component_directory}/conf")
tmp_dir = Script.get_tmp_dir()
oozie_user = config['configurations']['oozie-env']['oozie_user']
http://git-wip-us.apache.org/repos/asf/ambari/blob/b3f886e1/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
index eedaa69..aad3913 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
@@ -27,6 +27,11 @@
<description>Directory prefix for stacks installation</description>
</property>
<property>
+ <name>stack_shared_dir</name>
+ <value>/usr/share/HDP</value>
+ <description>Prefix for shared stack directory</description>
+ </property>
+ <property>
<name>stack_version_ru_support</name>
<value>2.2.0.0</value>
<description>Stack version from which rolling upgrade is supported and installation layout changed</description>
@@ -42,11 +47,21 @@
<description>Stack version from which snappy is not supported</description>
</property>
<property>
+ <name>stack_version_lzo_unsupport</name>
+ <value>2.2.1.0</value>
+ <description>Stack version from which lzo compression libraries are not needed</description>
+ </property>
+ <property>
<name>stack_version_nfs_support</name>
<value>2.3.0.0</value>
<description>Stack version from which hadoop-hdfs-nfs3 is supported</description>
</property>
<property>
+ <name>stack_version_oozie_preconfiguration_support</name>
+ <value>2.3.0.0</value>
+ <description>Stack version from which oozie-server special case in the PRE-UPGRADE phase is supported</description>
+ </property>
+ <property>
<name>security_enabled</name>
<value>false</value>
<description>Hadoop Security</description>