ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alejan...@apache.org
Subject ambari git commit: AMBARI-17783. Add falcon to oozie admin user for HDP 2.5 (Venkat Ranganathan via alejandro)
Date Tue, 19 Jul 2016 21:56:57 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 1d6caa874 -> 1ad5e5968


AMBARI-17783. Add falcon to oozie admin user for HDP 2.5 (Venkat Ranganathan via alejandro)


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

Branch: refs/heads/trunk
Commit: 1ad5e59687232ae1491fd7bfa316030e347013e2
Parents: 1d6caa8
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Tue Jul 19 14:59:44 2016 -0700
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Tue Jul 19 14:59:56 2016 -0700

----------------------------------------------------------------------
 .../stacks/HDP/2.5/services/stack_advisor.py         | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1ad5e596/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 65c21fc..b8f3074 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -33,6 +33,21 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
     self.YARN_ROOT_DEFAULT_QUEUE_NAME = 'default'
     self.AMBARI_MANAGED_LLAP_QUEUE_NAME = 'llap'
 
+  def recommendOozieConfigurations(self, configurations, clusterData, services, hosts):
+    super(HDP25StackAdvisor,self).recommendOozieConfigurations(configurations, clusterData,
services, hosts)
+    putOozieEnvProperty = self.putProperty(configurations, "oozie-env", services)
+    if "FALCON_SERVER" in clusterData["components"] :
+      if "falcon-env" in services["configurations"] and "falcon_user" \
+          in services["configurations"]["falcon-env"]["properties"] :
+        falconUser = services["configurations"]["falcon-env"]["properties"]["falcon_user"]
+      else :
+        falconUser = 'falcon'
+    oozieUser = services["configurations"]["oozie-env"]["properties"]["oozie_user"]
+    newAdminUsers = "{0},oozie-admin,{1}".format(oozieUser, falconUser)
+    services["forced-configurations"].append({"type" : "oozie-env", "name" : "oozie_admin_users"})
+    putOozieEnvProperty("oozie_admin_users", newAdminUsers)
+
+
   def createComponentLayoutRecommendations(self, services, hosts):
     parentComponentLayoutRecommendations = super(HDP25StackAdvisor, self).createComponentLayoutRecommendations(
       services, hosts)


Mime
View raw message