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/6900539d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6900539d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6900539d Branch: refs/heads/AMBARI-13364 Commit: 6900539d1a9f875789a2085805fa86d630b1c159 Parents: 897e6ab Author: Di Li <[email protected]> Authored: Mon Feb 29 10:30:41 2016 -0500 Committer: Jayush Luniya <[email protected]> Committed: Wed Mar 9 15:31:58 2016 -0800 ---------------------------------------------------------------------- .../package/alerts/alert_check_oozie_server.py | 10 ++++- .../OOZIE/4.0.0.2.0/package/scripts/oozie.py | 7 ++-- .../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 | 43 +++++++++++--------- .../4.0.0.2.0/package/scripts/service_check.py | 1 - .../4.0.0.2.0/package/scripts/status_params.py | 9 ++-- .../HDP/2.0.6/configuration/cluster-env.xml | 15 +++++++ 9 files changed, 87 insertions(+), 56 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/6900539d/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/6900539d/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 81a227e..2712f12 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 @@ -146,7 +146,7 @@ def oozie(is_server=False): owner=params.oozie_user ) - if params.stack_version_formatted != "" and compare_versions(params.stack_version_formatted, '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, @@ -200,7 +200,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 @@ -318,7 +318,8 @@ def oozie_server_specific(): mode = 0644, ) - if params.stack_version_formatted != "" and compare_versions(params.stack_version_formatted, '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/6900539d/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 4fc50d2..092c101 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_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_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/6900539d/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 030fb2d..5391a65 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_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_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 stack_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 stack_select.select("oozie-server", params.version) - if compare_versions(format_stack_version(params.version), '2.3.0.0') >= 0: + if compare_versions(format_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_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_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_stack_version(params.version), '2.2.0.0') >= 0: + if params.version and compare_versions(format_stack_version(params.version), params.stack_version_ru_support) >= 0: conf_select.select(params.stack_name, "oozie", params.version) stack_select.select("oozie-server", params.version) http://git-wip-us.apache.org/repos/asf/ambari/blob/6900539d/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 27e2766..2b6a3e5 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_stack_version(params.version), '2.2.1.0') >= 0 + format_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/6900539d/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 0decbc2..7b94f83 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 @@ -46,19 +46,25 @@ 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) agent_stack_retry_on_unavailability = cbool(config["hostLevelParams"]["agent_stack_retry_on_unavailability"]) agent_stack_retry_count = cint(config["hostLevelParams"]["agent_stack_retry_count"]) stack_version_unformatted = str(config['hostLevelParams']['stack_version']) stack_version_formatted = format_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 = stack_select.get_hadoop_dir("bin") hadoop_lib_home = stack_select.get_hadoop_dir("lib") #hadoop params -if Script.is_stack_greater_or_equal("2.2"): + +if Script.is_stack_greater_or_equal(stack_version_ru_support): # something like 2.3.0.0-1234 stack_version = None upgrade_stack = stack_select._get_upgrade_stack() @@ -68,25 +74,25 @@ if Script.is_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: @@ -123,9 +129,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'] @@ -143,7 +148,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_stack_less_than("2.2"): +if security_enabled and Script.is_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'] = \ @@ -194,7 +199,7 @@ if https_port is not None: hdfs_site = config['configurations']['hdfs-site'] fs_root = config['configurations']['core-site']['fs.defaultFS'] -if Script.is_stack_less_than("2.2"): +if Script.is_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/6900539d/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 8d14836..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' http://git-wip-us.apache.org/repos/asf/ambari/blob/6900539d/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 954bb80..98b6dbd 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_stack_greater_or_equal("2.2"): - conf_dir = format("/usr/hdp/current/{component_directory}/conf") + if Script.is_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/6900539d/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 70a5fbb..3bef518 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>
