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:58:22 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 c30054463 -> 5db5de89a


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/5db5de89
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5db5de89
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5db5de89

Branch: refs/heads/branch-2.4
Commit: 5db5de89a9f1841bfc5bca48dbb56b3c00dc6abe
Parents: c300544
Author: Alejandro Fernandez <afernandez@hortonworks.com>
Authored: Tue Jul 19 15:00:37 2016 -0700
Committer: Alejandro Fernandez <afernandez@hortonworks.com>
Committed: Tue Jul 19 15:00:37 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/5db5de89/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