Search code examples
javahadoopoozie

Oozie: multiple versions of the same custom java action


I'm using Oozie 4.1.0. I have deployed a custom action which extends the Java action. Now I need to deploy another version besides this one. The XSD would be the same but there are changes in the action code.

I'd put the updated action into a custom package and would version the action XSD. I guess the type name should be also changed in the constructor of the custom action as this needs to be unique, as far as I judged the code.
But then how can I refer to the same action name in my workflow XML which uses the new version? What is the recommended way to handle versions?


Solution

  • Steps to solve this issue:

    • One should deploy the new version of the jar (action) to Oozie
    • the new XSD version should be added to the oozie-site.xml under oozie.service.SchemaService.wf.ext.schemas

    During runtime one can change the actual Oozie action class that is associated to the given action. For this set oozie.launcher.action.main.class in the global configuration section in workflow.xml. This will be available in the launcherConf object in org.apache.oozie.action.hadoop.JavaActionExecutor#getLauncherMain which can be overridden in the custom action if further changes are needed.