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-20317. Update stack advisor logic for getting enable atlas hook flag value (Mugdha Varadkar via smohanty)
Date Mon, 06 Mar 2017 19:53:24 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 23bd4187c -> 1b8b91dc8


AMBARI-20317. Update stack advisor logic for getting enable atlas hook flag value (Mugdha
Varadkar via smohanty)


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

Branch: refs/heads/branch-2.5
Commit: 1b8b91dc87a0694cb7b3aa3a55829a90b202bb35
Parents: 23bd418
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Mon Mar 6 11:30:05 2017 -0800
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Mon Mar 6 11:53:04 2017 -0800

----------------------------------------------------------------------
 .../1.4.4.2.0/configuration/sqoop-site.xml      |  4 +++
 .../stacks/HDP/2.3/services/stack_advisor.py    | 31 ++++++++++----------
 2 files changed, 19 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1b8b91dc/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml
b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml
index 5d87c4d..5c9804b 100644
--- a/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml
+++ b/ambari-server/src/main/resources/common-services/SQOOP/1.4.4.2.0/configuration/sqoop-site.xml
@@ -40,6 +40,10 @@
         <type>sqoop-env</type>
         <name>sqoop.atlas.hook</name>
       </property>
+      <property>
+        <type>application-properties</type>
+        <name>atlas.rest.address</name>
+      </property>
     </depends-on>
   </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b8b91dc/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 f18bfe9..6d0ce38 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
@@ -257,7 +257,6 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
     else:
       hooks_value = ""
 
-
     hive_hooks = [x.strip() for x in hooks_value.split(",")]
     hive_hooks = [x for x in hive_hooks if x != ""]
     is_atlas_present_in_cluster = "ATLAS" in servicesList
@@ -268,11 +267,10 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
     else:
       putHiveEnvProperty("hive.atlas.hook", "false")
 
-    if ('hive-env' in services['configurations']) and ('hive.atlas.hook' in services['configurations']['hive-env']['properties']):
-      if 'hive-env' in configurations and 'hive.atlas.hook' in configurations['hive-env']['properties']:
-        enable_atlas_hook = configurations['hive-env']['properties']['hive.atlas.hook'] ==
"true"
-      elif 'hive-env' in services['configurations'] and 'hive.atlas.hook' in services['configurations']['hive-env']['properties']:
-        enable_atlas_hook = services['configurations']['hive-env']['properties']['hive.atlas.hook']
== "true"
+    if 'hive-env' in configurations and 'hive.atlas.hook' in configurations['hive-env']['properties']:
+      enable_atlas_hook = configurations['hive-env']['properties']['hive.atlas.hook'] ==
"true"
+    elif 'hive-env' in services['configurations'] and 'hive.atlas.hook' in services['configurations']['hive-env']['properties']:
+      enable_atlas_hook = services['configurations']['hive-env']['properties']['hive.atlas.hook']
== "true"
 
     if enable_atlas_hook:
       # Append atlas hook if not already present.
@@ -852,14 +850,16 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
     else:
       putSqoopEnvProperty("sqoop.atlas.hook", "false")
 
-    if ('sqoop-env' in services['configurations']) and ('sqoop.atlas.hook' in services['configurations']['sqoop-env']['properties']):
-      if 'sqoop-env' in configurations and 'sqoop.atlas.hook' in configurations['sqoop-env']['properties']:
-        enable_atlas_hook = configurations['sqoop-env']['properties']['sqoop.atlas.hook']
== "true"
-      elif 'sqoop-env' in services['configurations'] and 'sqoop.atlas.hook' in services['configurations']['sqoop-env']['properties']:
-        enable_atlas_hook = services['configurations']['sqoop-env']['properties']['sqoop.atlas.hook']
== "true"
+    if 'sqoop-env' in configurations and 'sqoop.atlas.hook' in configurations['sqoop-env']['properties']:
+      enable_atlas_hook = configurations['sqoop-env']['properties']['sqoop.atlas.hook'] ==
"true"
+    elif 'sqoop-env' in services['configurations'] and 'sqoop.atlas.hook' in services['configurations']['sqoop-env']['properties']:
+      enable_atlas_hook = services['configurations']['sqoop-env']['properties']['sqoop.atlas.hook']
== "true"
 
     if enable_atlas_hook:
       putSqoopSiteProperty('sqoop.job.data.publish.class', 'org.apache.atlas.sqoop.hook.SqoopHook')
+    else:
+      putSqoopSitePropertyAttribute = self.putPropertyAttribute(configurations, "sqoop-site")
+      putSqoopSitePropertyAttribute('sqoop.job.data.publish.class', 'delete', 'true')
 
   def recommendStormConfigurations(self, configurations, clusterData, services, hosts):
     super(HDP23StackAdvisor, self).recommendStormConfigurations(configurations, clusterData,
services, hosts)
@@ -887,11 +887,10 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
       else:
         putStormEnvProperty("storm.atlas.hook", "false")
 
-      if ('storm-env' in services['configurations']) and ('storm.atlas.hook' in services['configurations']['storm-env']['properties']):
-        if 'storm-env' in configurations and 'storm.atlas.hook' in configurations['storm-env']['properties']:
-          enable_atlas_hook = configurations['storm-env']['properties']['storm.atlas.hook']
== "true"
-        elif 'storm-env' in services['configurations'] and 'storm.atlas.hook' in services['configurations']['storm-env']['properties']:
-          enable_atlas_hook = services['configurations']['storm-env']['properties']['storm.atlas.hook']
== "true"
+      if 'storm-env' in configurations and 'storm.atlas.hook' in configurations['storm-env']['properties']:
+        enable_atlas_hook = configurations['storm-env']['properties']['storm.atlas.hook']
== "true"
+      elif 'storm-env' in services['configurations'] and 'storm.atlas.hook' in services['configurations']['storm-env']['properties']:
+        enable_atlas_hook = services['configurations']['storm-env']['properties']['storm.atlas.hook']
== "true"
 
       if enable_atlas_hook and not atlas_hook_is_set:
         notifier_plugin_value = atlas_hook_class if notifier_plugin_value == " " else ",".join([notifier_plugin_value,
atlas_hook_class])


Mime
View raw message