<?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: What are the best practices for implementing, testing and deploying oozie custom actions? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/What-are-the-best-practices-for-implementing-testing-and/m-p/28170#M43052</link>
    <description>1. Oozie "validate" is not supported with custom action so this would need to be commented out. 
2. need to add the custom action class [a] and schema [b] via CM: 
[a] Oozie -&amp;gt; Configuration -&amp;gt; Oozie ActionService Executor Extension Classes (add "org.apache.oozie.action.hadoop.MyShellActionExecutor") 
[b] Oozie -&amp;gt; Configuration -&amp;gt; Oozie SchemaService Workflow Extension Schemas (add "my-shell-action-0.1.xsd") 
3. put the custom jar under /var/lib/oozie
4. restart Oozie 
5. once Oozie has been restarted, go to the Oozie to verify that settings are applied: 
CM -&amp;gt; Oozie -&amp;gt; Oozie Web UI -&amp;gt; System Info (search for "MyShellActionExecutor" and " my-shell-action-0.1.xsd)</description>
    <pubDate>Wed, 03 Jun 2015 18:27:05 GMT</pubDate>
    <dc:creator>Dat Pham</dc:creator>
    <dc:date>2015-06-03T18:27:05Z</dc:date>
    <item>
      <title>What are the best practices for implementing, testing and deploying oozie custom actions?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/What-are-the-best-practices-for-implementing-testing-and/m-p/27553#M43050</link>
      <description>&lt;P&gt;We have&amp;nbsp;a preliminary&amp;nbsp;implementation of an oozie custom action (asyncronous if it matters) and would like to do some unit and functional testing prior without disturbing our production cluster and its workflows.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;What approaches are recommended for testing and validation of oozie custom actions?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;What debugging approaches are recommended?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Can we test in a vm sandbox (or in native mode on our Mac OSX dev machines) instead of on a cluster?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Are there any deployment approaches/issues that we should be aware of?&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried posting this earlier, but didn't see it post, so please forgive me if it shows up more than once.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:29:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/What-are-the-best-practices-for-implementing-testing-and/m-p/27553#M43050</guid>
      <dc:creator>BillM.</dc:creator>
      <dc:date>2022-09-16T09:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: What are the best practices for implementing, testing and deploying oozie custom actions?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/What-are-the-best-practices-for-implementing-testing-and/m-p/27781#M43051</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;To test a custom action,&amp;nbsp;I'd recommend simply running it in an Oozie server and seeing if you run into any problems. &amp;nbsp;You can also attach a debugger to Oozie to help there. &amp;nbsp;To save on turn-around time, you can also write a unit test that starts up LocalOozie and tries to submit your action. &amp;nbsp;To attach a debugger to Oozie, you should add the following to the "&lt;SPAN&gt;Oozie Service Environment Advanced Configuration Snippet (Safety Valve)"&amp;nbsp;&lt;/SPAN&gt;in Cloudera Manager (if not using CM, then you'd export this in oozie-env.sh:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;CATALINA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Besides using the debugger I mentioned above, looking at the launcher output (assuming you added print statements) can also be helpful; you can attach a debugger to the launcher job, but that's a bit harder because you need to attach it to the MR container instead of the Oozie server.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Oozie is pretty easy to run anywhere. &amp;nbsp;You can run it in a VM, on a cluster, or even on your Mac. &amp;nbsp;When developing for Oozie, I typically run it on my Mac against a pseudo-distributed cluster, also on my Mac. &amp;nbsp;You can use&amp;nbsp;&lt;A target="_blank" href="https://github.com/cloudera/oozie/blob/cdh5-4.1.0_5.4.1/core/src/main/resources/oozie-default.xml#L1839"&gt;oozie.service.HadoopAccessorService.hadoop.configurations&lt;/A&gt;&amp;nbsp;to point Oozie at any Hadoop cluster, or even multiple ones.&lt;/LI&gt;&lt;LI&gt;Nothing special. &amp;nbsp;Just make sure that your custom action's jar is in the Oozie servers classpath and that if your custom action has a sharelib, it's deployed in HDFS and Oozie sees it.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 21 May 2015 16:46:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/What-are-the-best-practices-for-implementing-testing-and/m-p/27781#M43051</guid>
      <dc:creator>Robert K</dc:creator>
      <dc:date>2015-05-21T16:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: What are the best practices for implementing, testing and deploying oozie custom actions?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/What-are-the-best-practices-for-implementing-testing-and/m-p/28170#M43052</link>
      <description>1. Oozie "validate" is not supported with custom action so this would need to be commented out. 
2. need to add the custom action class [a] and schema [b] via CM: 
[a] Oozie -&amp;gt; Configuration -&amp;gt; Oozie ActionService Executor Extension Classes (add "org.apache.oozie.action.hadoop.MyShellActionExecutor") 
[b] Oozie -&amp;gt; Configuration -&amp;gt; Oozie SchemaService Workflow Extension Schemas (add "my-shell-action-0.1.xsd") 
3. put the custom jar under /var/lib/oozie
4. restart Oozie 
5. once Oozie has been restarted, go to the Oozie to verify that settings are applied: 
CM -&amp;gt; Oozie -&amp;gt; Oozie Web UI -&amp;gt; System Info (search for "MyShellActionExecutor" and " my-shell-action-0.1.xsd)</description>
      <pubDate>Wed, 03 Jun 2015 18:27:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/What-are-the-best-practices-for-implementing-testing-and/m-p/28170#M43052</guid>
      <dc:creator>Dat Pham</dc:creator>
      <dc:date>2015-06-03T18:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: What are the best practices for implementing, testing and deploying oozie custom actions?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/What-are-the-best-practices-for-implementing-testing-and/m-p/28184#M43053</link>
      <description>&lt;P&gt;By the way, &lt;A href="https://issues.apache.org/jira/browse/OOZIE-2159" target="_self"&gt;OOZIE-2159&lt;/A&gt;&amp;nbsp;will fix the 'oozie validate' command not supporting&amp;nbsp;custom actions by moving the check from the Oozie client to the Oozie server, where the custom action is configured.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2015 23:54:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/What-are-the-best-practices-for-implementing-testing-and/m-p/28184#M43053</guid>
      <dc:creator>Robert K</dc:creator>
      <dc:date>2015-06-03T23:54:28Z</dc:date>
    </item>
  </channel>
</rss>

