Repository: ambari Updated Branches: refs/heads/trunk c0dd9681d -> 45c37ce33
AMBARI-18036. Restarting Falcon Server Failed on upgrade Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/45c37ce3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/45c37ce3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/45c37ce3 Branch: refs/heads/trunk Commit: 45c37ce338786bea0456e401be230f4d0579fceb Parents: c0dd968 Author: Sumit Mohanty <[email protected]> Authored: Fri Aug 5 16:21:14 2016 -0700 Committer: Sumit Mohanty <[email protected]> Committed: Fri Aug 5 16:29:07 2016 -0700 ---------------------------------------------------------------------- .../FALCON/0.5.0.2.1/package/scripts/falcon.py | 9 ++++++++- .../FALCON/0.5.0.2.1/package/scripts/params_linux.py | 3 --- 2 files changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/45c37ce3/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py index 30711cb..d3c38c2 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py @@ -30,11 +30,15 @@ from resource_management.core.resources.service import Service from resource_management.core.resources.service import ServiceConfig from resource_management.core.resources.system import Directory from resource_management.core.resources.system import File +from resource_management.libraries.functions import get_user_call_output from resource_management.libraries.script import Script from resource_management.libraries.resources import PropertiesFile from resource_management.libraries.functions import format from resource_management.libraries.functions.show_logs import show_logs from resource_management.libraries.functions import get_user_call_output +from resource_management.libraries.functions.setup_atlas_hook import has_atlas_in_cluster, setup_atlas_hook, install_atlas_hook_packages, setup_atlas_jar_symlinks +from resource_management.libraries.functions.stack_features import check_stack_feature +from resource_management.libraries.functions.version import format_stack_version from resource_management.libraries.functions import StackFeature from resource_management.libraries.functions.setup_atlas_hook import has_atlas_in_cluster, setup_atlas_hook, install_atlas_hook_packages, setup_atlas_jar_symlinks from resource_management.libraries.functions.stack_features import check_stack_feature @@ -161,8 +165,11 @@ def falcon(type, action = None, upgrade_type=None): mode = 0770, source = params.local_data_mirroring_dir) - if params.supports_falcon_extensions: + # Falcon Extensions were supported in HDP 2.5 and higher. + effective_version = params.stack_version_formatted if upgrade_type is None else format_stack_version(params.version) + supports_falcon_extensions = effective_version and check_stack_feature(StackFeature.FALCON_EXTENSIONS, effective_version) + if supports_falcon_extensions: params.HdfsResource(params.falcon_extensions_dest_dir, type = "directory", action = "create_on_execute", http://git-wip-us.apache.org/repos/asf/ambari/blob/45c37ce3/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py index f59d77c..2220480 100644 --- a/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_linux.py @@ -129,9 +129,6 @@ supports_hive_dr = config['configurations']['falcon-env']['supports_hive_dr'] # In HDP 2.5, an empty data-mirroring folder has to be created, and the extensions folder has to be uploaded to HDFS. supports_data_mirroring = supports_hive_dr and (stack_version_formatted and not check_stack_feature(StackFeature.FALCON_EXTENSIONS, stack_version_formatted)) -# Falcon Extensions were supported in HDP 2.5 and higher. -supports_falcon_extensions = (stack_version_formatted and check_stack_feature(StackFeature.FALCON_EXTENSIONS, stack_version_formatted)) - local_data_mirroring_dir = format('{stack_root}/current/falcon-server/data-mirroring') dfs_data_mirroring_dir = "/apps/data-mirroring"
