From 65330b880eb312f488a5e0305d2a01b5c6ff4e9f Mon Sep 17 00:00:00 2001 From: groghkov Date: Mon, 21 Mar 2016 16:37:58 +0200 Subject: [PATCH] Set libext path for Oozie 4.0.1, 4.1.0 Change-Id: Ide4787ce56a295704909e17b93c2f63e330484a0 Closes-Bug: #1560057 --- sahara/plugins/mapr/services/oozie/oozie.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sahara/plugins/mapr/services/oozie/oozie.py b/sahara/plugins/mapr/services/oozie/oozie.py index 700cdafb68..3634857056 100644 --- a/sahara/plugins/mapr/services/oozie/oozie.py +++ b/sahara/plugins/mapr/services/oozie/oozie.py @@ -43,8 +43,9 @@ class Oozie(s.Service): self._cluster_defaults = ['oozie-default.json'] self._validation_rules = [vu.exactly(1, OOZIE)] self._ui_info = [('Oozie', OOZIE, 'http://%s:11000/oozie')] - self._libext_path = '/opt/mapr/oozie/oozie-%s/oozie-server/lib/' % \ - self.version + + def libext_path(self): + return '/opt/mapr/oozie/oozie-%s/oozie-server/lib/' % self.version def get_config_files(self, cluster_context, configs, instance=None): oozie_site = bcf.HadoopXML("oozie-site.xml") @@ -90,7 +91,7 @@ class Oozie(s.Service): if oozie_service: symlink_cmd = ( 'cp /usr/share/java/mysql-connector-java.jar %s' % - self._libext_path) + self.libext_path()) with oozie_inst.remote() as r: LOG.debug('Installing MySQL connector for Oozie') r.execute_command(symlink_cmd, run_as_root=True, @@ -141,5 +142,6 @@ class OozieV420(Oozie): super(OozieV420, self).__init__() self._version = '4.2.0' self._dependencies = [('mapr-oozie-internal', self.version)] - self._libext_path = '/opt/mapr/oozie/oozie-%s/libext/' % \ - self.version + + def libext_path(self): + return '/opt/mapr/oozie/oozie-%s/libext/' % self.version