You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by mu...@apache.org on 2017/05/08 05:29:24 UTC
ambari git commit: AMBARI-20930: stackadvisor recommendations for
atlas hooks should be disabled for external Atlas (Vishal Suvagia via mugdha)
Repository: ambari
Updated Branches:
refs/heads/trunk 2cd5a4395 -> f9f44b7e2
AMBARI-20930: stackadvisor recommendations for atlas hooks should be disabled for external Atlas (Vishal Suvagia via mugdha)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f9f44b7e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f9f44b7e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f9f44b7e
Branch: refs/heads/trunk
Commit: f9f44b7e2b9a576816e2062cfe307f3687f99de8
Parents: 2cd5a43
Author: Vishal Suvagia <vi...@yahoo.com>
Authored: Fri May 5 17:19:55 2017 +0530
Committer: Mugdha Varadkar <mu...@apache.org>
Committed: Mon May 8 10:58:30 2017 +0530
----------------------------------------------------------------------
.../HIVE/2.1.0.3.0/service_advisor.py | 7 +++++
.../stacks/HDP/2.3/services/stack_advisor.py | 27 ++++++++++++++++++--
2 files changed, 32 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f44b7e/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
index ef3e340..6d3e13d 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/service_advisor.py
@@ -568,9 +568,16 @@ class HiveRecommender(service_advisor.ServiceAdvisor):
hive_hooks = [x for x in hive_hooks if x != ""]
is_atlas_present_in_cluster = "ATLAS" in servicesList
+ enable_external_atlas_for_hive = False
enable_atlas_hook = False
+
+ if 'hive-atlas-application.properties' in services['configurations'] and 'enable.external.atlas.for.hive' in services['configurations']['hive-atlas-application.properties']['properties']:
+ enable_external_atlas_for_hive = services['configurations']['hive-atlas-application.properties']['properties']['enable.external.atlas.for.hive'].lower() == "true"
+
if is_atlas_present_in_cluster:
putHiveEnvProperty("hive.atlas.hook", "true")
+ elif enable_external_atlas_for_hive:
+ putHiveEnvProperty("hive.atlas.hook", "true")
else:
putHiveEnvProperty("hive.atlas.hook", "false")
http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f44b7e/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
index eb7389d..8cefdac 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
@@ -232,9 +232,16 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
hive_hooks = [x for x in hive_hooks if x != ""]
is_atlas_present_in_cluster = "ATLAS" in servicesList
+ enable_external_atlas_for_hive = False
enable_atlas_hook = False
+
+ if 'hive-atlas-application.properties' in services['configurations'] and 'enable.external.atlas.for.hive' in services['configurations']['hive-atlas-application.properties']['properties']:
+ enable_external_atlas_for_hive = services['configurations']['hive-atlas-application.properties']['properties']['enable.external.atlas.for.hive'].lower() == "true"
+
if is_atlas_present_in_cluster:
putHiveEnvProperty("hive.atlas.hook", "true")
+ elif enable_external_atlas_for_hive:
+ putHiveEnvProperty("hive.atlas.hook", "true")
else:
putHiveEnvProperty("hive.atlas.hook", "false")
@@ -814,10 +821,16 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
putSqoopSiteProperty = self.putProperty(configurations, "sqoop-site", services)
putSqoopEnvProperty = self.putProperty(configurations, "sqoop-env", services)
+ enable_external_atlas_for_sqoop = False
enable_atlas_hook = False
servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+ if 'sqoop-atlas-application.properties' in services['configurations'] and 'enable.external.atlas.for.sqoop' in services['configurations']['sqoop-atlas-application.properties']['properties']:
+ enable_external_atlas_for_sqoop = services['configurations']['sqoop-atlas-application.properties']['properties']['enable.external.atlas.for.sqoop'].lower() == "true"
+
if "ATLAS" in servicesList:
putSqoopEnvProperty("sqoop.atlas.hook", "true")
+ elif enable_external_atlas_for_sqoop:
+ putSqoopEnvProperty("sqoop.atlas.hook", "true")
else:
putSqoopEnvProperty("sqoop.atlas.hook", "false")
@@ -852,9 +865,15 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
atlas_hook_class = "org.apache.atlas.storm.hook.StormAtlasHook"
atlas_hook_is_set = atlas_hook_class in notifier_plugin_value
enable_atlas_hook = False
+ enable_external_atlas_for_storm = False
+
+ if 'storm-atlas-application.properties' in services['configurations'] and 'enable.external.atlas.for.storm' in services['configurations']['storm-atlas-application.properties']['properties']:
+ enable_external_atlas_for_storm = services['configurations']['storm-atlas-application.properties']['properties']['enable.external.atlas.for.storm'].lower() == "true"
if atlas_is_present:
putStormEnvProperty("storm.atlas.hook", "true")
+ elif enable_external_atlas_for_storm:
+ putStormEnvProperty("storm.atlas.hook", "true")
else:
putStormEnvProperty("storm.atlas.hook", "false")
@@ -881,9 +900,14 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
putFalconEnvProperty = self.putProperty(configurations, "falcon-env", services)
enable_atlas_hook = False
servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
+ enable_external_atlas_for_falcon = False
+ if 'falcon-atlas-application.properties' in services['configurations'] and 'enable.external.atlas.for.falcon' in services['configurations']['falcon-atlas-application.properties']['properties']:
+ enable_external_atlas_for_falcon = services['configurations']['falcon-atlas-application.properties']['properties']['enable.external.atlas.for.falcon'].lower() == "true"
if "ATLAS" in servicesList:
putFalconEnvProperty("falcon.atlas.hook", "true")
+ elif enable_external_atlas_for_falcon:
+ putFalconEnvProperty("falcon.atlas.hook", "true")
else:
putFalconEnvProperty("falcon.atlas.hook", "false")
@@ -1064,7 +1088,7 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
kafka_broker = properties
validationItems = []
servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
-
+
#Adding Ranger Plugin logic here
ranger_plugin_properties = self.getSiteProperties(configurations, "ranger-kafka-plugin-properties")
ranger_plugin_enabled = ranger_plugin_properties['ranger-kafka-plugin-enabled'] if ranger_plugin_properties else 'No'
@@ -1118,4 +1142,3 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
validationProblems = self.toConfigurationValidationProblems(validationItems, "ranger-env")
validationProblems.extend(parentValidationProblems)
return validationProblems
-