<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Workflow triggered by coordinator does not get the sharelibs in its classpath in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Workflow-triggered-by-coordinator-does-not-get-the-sharelibs/m-p/170862#M37399</link>
    <description>&lt;P&gt;Yes, I am using exactly the same workflow.xml in the same location for both tests - when running just the workflow itself (oozie job -run -debug -config workflow.properties) or through coordinator (oozie job -run -debug -config coordinator.properties). So I am not interested at all copying any JARs to the lib directory - that's the whole point of the sharelib to avoid that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have added "oozie.use.system.libpath=true" to my coordinator.properties (config to launch coordinator job) and it seems exactly what was missing! I see, sharelib is not added to the classpath without having this property set to true.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 10 Aug 2016 07:43:07 GMT</pubDate>
    <dc:creator>ngrigoriev</dc:creator>
    <dc:date>2016-08-10T07:43:07Z</dc:date>
    <item>
      <title>Workflow triggered by coordinator does not get the sharelibs in its classpath</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Workflow-triggered-by-coordinator-does-not-get-the-sharelibs/m-p/170860#M37397</link>
      <description>&lt;P&gt;I am in process of switching to Oozie for our periodic tasks. I have started with a regular workflow and finally got it working. My workflow.xml is like this:&lt;/P&gt;&lt;PRE&gt;&amp;lt;workflow-app xmlns="uri:oozie:workflow:0.5" name="clean-opens"&amp;gt;
        &amp;lt;start to="mr-clean-opens" /&amp;gt;

        &amp;lt;action name="mr-clean-opens"&amp;gt;
                &amp;lt;map-reduce&amp;gt;
                        &amp;lt;job-tracker&amp;gt;${jobTracker}&amp;lt;/job-tracker&amp;gt;
                        &amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt;
                        &amp;lt;configuration&amp;gt;
                                &amp;lt;property&amp;gt;
                                        &amp;lt;name&amp;gt;mapred.job.queue.name&amp;lt;/name&amp;gt;
                                        &amp;lt;value&amp;gt;${queueName}&amp;lt;/value&amp;gt;
                                &amp;lt;/property&amp;gt;
                                &amp;lt;property&amp;gt;
                                        &amp;lt;name&amp;gt;oozie.use.system.libpath&amp;lt;/name&amp;gt;
                                        &amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;
                                &amp;lt;/property&amp;gt;
                                &amp;lt;property&amp;gt;
                                        &amp;lt;name&amp;gt;mapred.mapper.new-api&amp;lt;/name&amp;gt;
                                        &amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;
                                &amp;lt;/property&amp;gt;
                                &amp;lt;property&amp;gt;
                                        &amp;lt;name&amp;gt;mapred.reducer.new-api&amp;lt;/name&amp;gt;
                                        &amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;
                                &amp;lt;/property&amp;gt;
                                &amp;lt;property&amp;gt;
                                        &amp;lt;name&amp;gt;oozie.action.sharelib.for.map-reduce&amp;lt;/name&amp;gt;
                                        &amp;lt;value&amp;gt;zookeeper,hbase,myapp&amp;lt;/value&amp;gt;
                                &amp;lt;/property&amp;gt;
                        &amp;lt;/configuration&amp;gt;
                        &amp;lt;config-class&amp;gt;x.y.z.CleanOpensProcessConfiguration&amp;lt;/config-class&amp;gt;
                &amp;lt;/map-reduce&amp;gt;
                &amp;lt;ok to="end" /&amp;gt;
                &amp;lt;error to="fail" /&amp;gt;
        &amp;lt;/action&amp;gt;
        &amp;lt;kill name="fail"&amp;gt;
                &amp;lt;message&amp;gt;CleanOpensProcess failed, error message[${wf:errorMessage(wf:lastErrorNode())}]&amp;lt;/message&amp;gt;
        &amp;lt;/kill&amp;gt;
        &amp;lt;end name="end" /&amp;gt;
&amp;lt;/workflow-app&amp;gt;&lt;/PRE&gt;&lt;P&gt;Note that "hbase", "zookeeper" and "myapp" are my own sharelibs. First two are obvious, the last one is, actually, my application JAR. I have a bunch of MR jobs in that jar so I was thinking about just making it a sharelib and using it from different workflows.&lt;/P&gt;&lt;P&gt;I run it using the following property file:
&lt;/P&gt;&lt;PRE&gt;jobTracker=hadoop-node02.stage.mydomain.net:8050
nameNode=hdfs://hadoop-node01.stage.mydomain.net:8020

applicationPath=${nameNode}/apps/myapp
queueName=default

mapreduce.framework.name=yarn

oozie.wf.application.path=${applicationPath}
oozie.use.system.libpath=true&lt;/PRE&gt;&lt;P&gt;This WORKS. I have workflow.xml in /apps/myapp, MR job runs fine.&lt;/P&gt;&lt;P&gt;Now I want to switch to coordinator-driven execution, once an hour. I have created this coordinator.xml:&lt;/P&gt;&lt;PRE&gt;&amp;lt;coordinator-app name="clean-opens-coordinator"
        start="2016-08-01T00:00Z" end="2020-06-01T00:00Z"
        frequency="10 * * * *" timezone="America/Montreal" xmlns="uri:oozie:coordinator:0.4"&amp;gt;

        &amp;lt;action&amp;gt;
                &amp;lt;workflow&amp;gt;
                        &amp;lt;app-path&amp;gt;${applicationPath}&amp;lt;/app-path&amp;gt;
                        &amp;lt;configuration&amp;gt;
                                &amp;lt;property&amp;gt;
                                        &amp;lt;name&amp;gt;oozie.action.sharelib.for.map-reduce&amp;lt;/name&amp;gt;
                                        &amp;lt;value&amp;gt;zookeeper,hbase,myapp&amp;lt;/value&amp;gt;
                                &amp;lt;/property&amp;gt;
                                &amp;lt;property&amp;gt;
                                        &amp;lt;name&amp;gt;queueName&amp;lt;/name&amp;gt;
                                        &amp;lt;value&amp;gt;${queueName}&amp;lt;/value&amp;gt;
                                &amp;lt;/property&amp;gt;
                        &amp;lt;/configuration&amp;gt;
                &amp;lt;/workflow&amp;gt;
        &amp;lt;/action&amp;gt;

&amp;lt;/coordinator-app&amp;gt;&lt;/PRE&gt;&lt;P&gt;I have placed this XML in /apps/myapp-coordinator/coordinator.xml and tried to use this coordinator.properties to deploy that job:&lt;/P&gt;&lt;PRE&gt;jobTracker=hadoop-node02.stage.mydomain.net:8050
nameNode=hdfs://hadoop-node01.stage.mydomain.net:8020


applicationPath=${nameNode}/apps/myapp
coordinatorPath=${nameNode}/apps/myapp-coordinator/coordinator.xml
queueName=default

oozie.action.sharelib.for.map-reduce=zookeeper,hbase,myapp

mapreduce.framework.name=yarn

oozie.coord.application.path=${coordinatorPath}
&lt;/PRE&gt;&lt;P&gt;When the job runs, I get ClassNotFoundException for my x.y.z.CleanOpensProcessConfiguration class. As you can see, I have even tried to populate this "oozie.action.sharelib.for.map-reduce" property in multiple files without any luck. &lt;/P&gt;&lt;P&gt;Again, launching the workflow works fine, but launching it through coordinator does not work because it cannot find the class it needs. I am wondering if there is something I am missing about how coordinator launches the workflow. Will appreciate any suggestions.
&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 06:58:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Workflow-triggered-by-coordinator-does-not-get-the-sharelibs/m-p/170860#M37397</guid>
      <dc:creator>ngrigoriev</dc:creator>
      <dc:date>2016-08-10T06:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow triggered by coordinator does not get the sharelibs in its classpath</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Workflow-triggered-by-coordinator-does-not-get-the-sharelibs/m-p/170861#M37398</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12405/ngrigoriev.html" nodeid="12405"&gt;@Nikolai Grigoriev&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Can you please let us know if you are using same workflow.xml for this coordinator, I see that you have set below property in your coorinator.xml&lt;/P&gt;&lt;PRE&gt; &amp;lt;property&amp;gt;
	&amp;lt;name&amp;gt;oozie.action.sharelib.for.map-reduce&amp;lt;/name&amp;gt;
	&amp;lt;value&amp;gt;zookeeper,hbase,myapp&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;This property will work for your workflow.xml as you have 'map-reduce' action in it ( notice action name after for in your property )&lt;/P&gt;&lt;P&gt;e.g. - oozie.action.sharelib.for.&lt;STRONG&gt;&amp;lt;action-name&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Also please add below property in your job.propeties&lt;/P&gt;&lt;PRE&gt;oozie.use.system.libpath=true&lt;/PRE&gt;&lt;P&gt;Other alternative way is to place required jars in ${applicationPath}/lib directory. those jars will get picked up by Oozie automatically.&lt;/P&gt;&lt;P&gt;Please do let us know if it still fails with provided info.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 07:28:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Workflow-triggered-by-coordinator-does-not-get-the-sharelibs/m-p/170861#M37398</guid>
      <dc:creator>KuldeepK</dc:creator>
      <dc:date>2016-08-10T07:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow triggered by coordinator does not get the sharelibs in its classpath</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Workflow-triggered-by-coordinator-does-not-get-the-sharelibs/m-p/170862#M37399</link>
      <description>&lt;P&gt;Yes, I am using exactly the same workflow.xml in the same location for both tests - when running just the workflow itself (oozie job -run -debug -config workflow.properties) or through coordinator (oozie job -run -debug -config coordinator.properties). So I am not interested at all copying any JARs to the lib directory - that's the whole point of the sharelib to avoid that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have added "oozie.use.system.libpath=true" to my coordinator.properties (config to launch coordinator job) and it seems exactly what was missing! I see, sharelib is not added to the classpath without having this property set to true.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 07:43:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Workflow-triggered-by-coordinator-does-not-get-the-sharelibs/m-p/170862#M37399</guid>
      <dc:creator>ngrigoriev</dc:creator>
      <dc:date>2016-08-10T07:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow triggered by coordinator does not get the sharelibs in its classpath</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Workflow-triggered-by-coordinator-does-not-get-the-sharelibs/m-p/170863#M37400</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12405/ngrigoriev.html" nodeid="12405"&gt;@Nikolai Grigoriev&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Glad to see that it worked! Please let us know in case of any further issues. HCC is always there for you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 11:31:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Workflow-triggered-by-coordinator-does-not-get-the-sharelibs/m-p/170863#M37400</guid>
      <dc:creator>KuldeepK</dc:creator>
      <dc:date>2016-08-10T11:31:00Z</dc:date>
    </item>
  </channel>
</rss>

