ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject [4/4] ambari git commit: AMBARI-9905. Client configs downloaded from host and from ui are not the same for Oozie (dlysnichenko)
Date Wed, 04 Mar 2015 18:39:46 GMT
AMBARI-9905. Client configs downloaded from host and from ui are not the same for Oozie (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 16a97aaceeb406d6df64326126c60981f645dd3f
Parents: 04d63af
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Wed Mar 4 20:37:12 2015 +0200
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Wed Mar 4 20:39:22 2015 +0200

----------------------------------------------------------------------
 .../OOZIE/4.0.0.2.0/package/scripts/oozie_client.py   | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/16a97aac/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py
index faa326a..d0e6dad 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py
@@ -24,7 +24,7 @@ from resource_management import *
 from oozie import oozie
 from oozie_service import oozie_service
 
-         
+
 class OozieClient(Script):
 
   def get_stack_to_component(self):
@@ -57,6 +57,16 @@ class OozieClient(Script):
     Logger.info("Executing Oozie Client Rolling Upgrade pre-restart")
     Execute(format("hdp-select set oozie-client {version}"))
 
-    
+  # We substitute some configs (oozie.authentication.kerberos.principal) before generation
(see oozie.py and params.py).
+  # This function returns changed configs (it's used for config generation before config
download)
+  def generate_configs_get_xml_file_content(self, filename, dictionary):
+    if dictionary == 'oozie-site':
+      import params
+      config = self.get_config()
+      return {'configurations': params.oozie_site,
+              'configuration_attributes': config['configuration_attributes'][dictionary]}
+    else:
+      return super(OozieClient, self).generate_configs_get_xml_file_content(filename, dictionary)
+
 if __name__ == "__main__":
   OozieClient().execute()


Mime
View raw message