Repository: ambari Updated Branches: refs/heads/branch-2.4 d3de20c45 -> 100c805f8
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/100c805f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/100c805f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/100c805f Branch: refs/heads/branch-2.4 Commit: 100c805f82152e0ffa98dac369afca3cd17d3649 Parents: d3de20c Author: Sumit Mohanty <[email protected]> Authored: Fri Aug 5 16:21:14 2016 -0700 Committer: Sumit Mohanty <[email protected]> Committed: Fri Aug 5 16:21:14 2016 -0700 ---------------------------------------------------------------------- .../FALCON/0.5.0.2.1/package/scripts/falcon.py | 8 ++++++-- .../FALCON/0.5.0.2.1/package/scripts/params_linux.py | 3 --- 2 files changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/100c805f/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 f214b49..8025e56 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,13 +30,14 @@ 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.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 import get_user_call_output +from resource_management.libraries.functions.version import format_stack_version from resource_management.libraries.functions import StackFeature from ambari_commons.constants import SERVICE from resource_management.core.logger import Logger @@ -161,8 +162,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/100c805f/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"
