Search code examples
javaooziehueoozie-coordinator

Passing Name of Oozie Coordinator as a Workflow Parameter


I have an Oozie coordinator in Hue that calls a workflow which has a java action. I would like to pass the name of the coordinator as a parameter to the workflow so that I can pass it to the java action. Is this possible? I see workflow EL functions: http://archive.cloudera.com/cdh4/cdh/4/oozie/WorkflowFunctionalSpec.html#a4.2.5_Hadoop_EL_Functions But I couldn't find anything for coordinator metadata.


Solution

  • As far as I can tell, there is no EL function that allows the Coordinator to retrieve its own name dynamically, and pass it to its child Workflow in a custom property.

    There are lots of things that you can retrieve about what triggered the execution -- nominal time, execution number, input dataset name etc.-- but not the Coordinator name. What would be the point?

    Remember that when you submit the Coordinator, you can just define a custom parameter to pass a custom label.
    In other words, in addition to the usual jobTracker and nameNode you can define coordCustomLabel or covfefe or whatever. And assign that parameter any string value you want -- the Coordinator name, or some free-text comments, or a list of tags.
    The custom parameter will be inherited by the Workflow instances -- just like like jobTracker and friends.