ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject ambari git commit: AMBARI-18086. Falcon Ambari integration should be enabled even if Atlas server and Falcon server are no collocated
Date Tue, 09 Aug 2016 19:57:25 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 2a55dc08c -> c20573adc


AMBARI-18086. Falcon Ambari integration should be enabled even if Atlas server and Falcon
server are no collocated


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c20573ad
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c20573ad
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c20573ad

Branch: refs/heads/branch-2.4
Commit: c20573adcfede087a7c4b47765c8552b285db6b6
Parents: 2a55dc0
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Tue Aug 9 12:46:42 2016 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Tue Aug 9 12:57:10 2016 -0700

----------------------------------------------------------------------
 .../libraries/functions/package_conditions.py   |  2 +-
 .../0.5.0.2.1/package/scripts/params_linux.py   | 30 +++++++-------------
 2 files changed, 11 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c20573ad/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py
b/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py
index a8b5827..acc4bd8 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/package_conditions.py
@@ -100,7 +100,7 @@ def should_install_falcon_atlas_hook():
   stack_version_formatted = format_stack_version(stack_version_unformatted)
   if check_stack_feature(StackFeature.FALCON_ATLAS_SUPPORT_2_3, stack_version_formatted)
\
       or check_stack_feature(StackFeature.FALCON_ATLAS_SUPPORT, stack_version_formatted):
-    return _has_local_components(config, ['FALCON_SERVER', 'ATLAS_SERVER'], all)
+    return _has_applicable_local_component(config, ['FALCON_SERVER'])
   return False
 
 def should_install_ranger_tagsync():

http://git-wip-us.apache.org/repos/asf/ambari/blob/c20573ad/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 a3a4e54..0fb21d0 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
@@ -140,14 +140,6 @@ dfs_data_mirroring_dir = "/apps/data-mirroring"
 falcon_atlas_application_properties = default('/configurations/falcon-atlas-application.properties',
{})
 
 # Calculate atlas_hook_cp to add to FALCON_EXTRA_CLASS_PATH
-atlas_hosts = default('/clusterHostInfo/atlas_server_hosts', [])
-has_atlas_server_on_host = False
-
-for host in atlas_hosts:
-  if host.upper() == hostname.upper():
-    has_atlas_server_on_host = True
-    break
-
 falcon_atlas_support = False
 
 # Path to add to environment variable
@@ -155,18 +147,16 @@ atlas_hook_cp = ""
 if has_atlas_in_cluster():
   atlas_hook_filename = default('/configurations/atlas-env/metadata_conf_file', 'atlas-application.properties')
 
-  # Only append /etc/atlas/conf to classpath if on HDP 2.4.* and atlas server is running
on this host.
-  if has_atlas_server_on_host:
-    # stack_version doesn't contain a minor number of the stack (only first two numbers:
2.3). Get it from current_version_formatted
-    falcon_atlas_support = current_version_formatted and check_stack_feature(StackFeature.FALCON_ATLAS_SUPPORT_2_3,
current_version_formatted) \
-        or check_stack_feature(StackFeature.FALCON_ATLAS_SUPPORT, stack_version_formatted)
-
-    if check_stack_feature(StackFeature.ATLAS_CONF_DIR_IN_PATH, stack_version_formatted):
-      atlas_conf_dir = os.environ['METADATA_CONF'] if 'METADATA_CONF' in os.environ else
format('{stack_root}/current/atlas-server/conf')
-      atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ
else format('{stack_root}/current/atlas-server')
-      atlas_hook_cp = atlas_conf_dir + os.pathsep + os.path.join(atlas_home_dir, "hook",
"falcon", "*") + os.pathsep
-    elif check_stack_feature(StackFeature.ATLAS_UPGRADE_SUPPORT, stack_version_formatted):
-      atlas_hook_cp = format('{stack_root}/current/atlas-client/hook/falcon/*') + os.pathsep
+  # stack_version doesn't contain a minor number of the stack (only first two numbers: 2.3).
Get it from current_version_formatted
+  falcon_atlas_support = current_version_formatted and check_stack_feature(StackFeature.FALCON_ATLAS_SUPPORT_2_3,
current_version_formatted) \
+      or check_stack_feature(StackFeature.FALCON_ATLAS_SUPPORT, stack_version_formatted)
+
+  if check_stack_feature(StackFeature.ATLAS_CONF_DIR_IN_PATH, stack_version_formatted):
+    atlas_conf_dir = os.environ['METADATA_CONF'] if 'METADATA_CONF' in os.environ else format('{stack_root}/current/atlas-server/conf')
+    atlas_home_dir = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ
else format('{stack_root}/current/atlas-server')
+    atlas_hook_cp = atlas_conf_dir + os.pathsep + os.path.join(atlas_home_dir, "hook", "falcon",
"*") + os.pathsep
+  elif check_stack_feature(StackFeature.ATLAS_UPGRADE_SUPPORT, stack_version_formatted):
+    atlas_hook_cp = format('{stack_root}/current/atlas-client/hook/falcon/*') + os.pathsep
 
 atlas_application_class_addition = ""
 if falcon_atlas_support:


Mime
View raw message