|
@@ -21,30 +21,30 @@ import status_params
|
|
|
from resource_management.libraries.resources.hdfs_resource import HdfsResource
|
|
|
from resource_management.libraries.functions import stack_select
|
|
|
from resource_management.libraries.functions import format
|
|
|
-from resource_management.libraries.functions.version import format_stack_version
|
|
|
from resource_management.libraries.functions.default import default
|
|
|
from resource_management.libraries.functions.get_not_managed_resources import get_not_managed_resources
|
|
|
from resource_management.libraries.functions import get_kinit_path
|
|
|
from resource_management.libraries.script.script import Script
|
|
|
import os
|
|
|
+from resource_management.libraries.functions.stack_features import check_stack_feature
|
|
|
+from resource_management.libraries.functions import StackFeature
|
|
|
|
|
|
config = Script.get_config()
|
|
|
-
|
|
|
+stack_root = status_params.stack_root
|
|
|
stack_name = default("/hostLevelParams/stack_name", None)
|
|
|
|
|
|
# New Cluster Stack Version that is defined during the RESTART of a Rolling Upgrade
|
|
|
version = default("/commandParams/version", None)
|
|
|
|
|
|
-stack_version_unformatted = config['hostLevelParams']['stack_version']
|
|
|
-stack_version_formatted = format_stack_version(stack_version_unformatted)
|
|
|
+stack_version_unformatted = status_params.stack_version_unformatted
|
|
|
+stack_version_formatted = status_params.stack_version_formatted
|
|
|
etc_prefix_dir = "/etc/falcon"
|
|
|
|
|
|
# hadoop params
|
|
|
hadoop_home_dir = stack_select.get_hadoop_dir("home")
|
|
|
hadoop_bin_dir = stack_select.get_hadoop_dir("bin")
|
|
|
|
|
|
-if Script.is_stack_greater_or_equal("2.2"):
|
|
|
-
|
|
|
+if stack_version_formatted and check_stack_feature(StackFeature.ROLLING_UPGRADE, stack_version_formatted):
|
|
|
# if this is a server action, then use the server binaries; smoke tests
|
|
|
# use the client binaries
|
|
|
server_role_dir_mapping = { 'FALCON_SERVER' : 'falcon-server',
|
|
@@ -55,8 +55,8 @@ if Script.is_stack_greater_or_equal("2.2"):
|
|
|
command_role = 'FALCON_SERVICE_CHECK'
|
|
|
|
|
|
falcon_root = server_role_dir_mapping[command_role]
|
|
|
- falcon_webapp_dir = format('/usr/hdp/current/{falcon_root}/webapp')
|
|
|
- falcon_home = format('/usr/hdp/current/{falcon_root}')
|
|
|
+ falcon_webapp_dir = format('{stack_root}/current/{falcon_root}/webapp')
|
|
|
+ falcon_home = format('{stack_root}/current/{falcon_root}')
|
|
|
else:
|
|
|
falcon_webapp_dir = '/var/lib/falcon/webapp'
|
|
|
falcon_home = '/usr/lib/falcon'
|
|
@@ -107,7 +107,7 @@ smokeuser_principal = config['configurations']['cluster-env']['smokeuser_princi
|
|
|
kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
|
|
|
|
|
|
supports_hive_dr = config['configurations']['falcon-env']['supports_hive_dr']
|
|
|
-local_data_mirroring_dir = "/usr/hdp/current/falcon-server/data-mirroring"
|
|
|
+local_data_mirroring_dir = format('{stack_root}/current/falcon-server/data-mirroring')
|
|
|
dfs_data_mirroring_dir = "/apps/data-mirroring"
|
|
|
|
|
|
atlas_hosts = default('/clusterHostInfo/atlas_server_hosts', [])
|
|
@@ -116,7 +116,7 @@ has_atlas = len(atlas_hosts) > 0
|
|
|
if has_atlas:
|
|
|
atlas_conf_file = config['configurations']['atlas-env']['metadata_conf_file']
|
|
|
atlas_conf_dir = os.environ['METADATA_CONF'] if 'METADATA_CONF' in os.environ else '/etc/atlas/conf'
|
|
|
- atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ else '/usr/hdp/current/atlas-server'
|
|
|
+ atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ else format('{stack_root}/current/atlas-server')
|
|
|
|
|
|
application_services = "org.apache.falcon.security.AuthenticationInitializationService,\
|
|
|
org.apache.falcon.workflow.WorkflowJobEndNotificationService, \
|