Reply
New Contributor
Posts: 1
Registered: ‎05-13-2015

Oozie Workflow : How to get current action node name?

How to get the name of current action in oozie workflow?

 

Eg :

 

<action name="hello_action">
    <shell xmlns="uri:oozie:shell-action:0.1">
        <job-tracker>${jobTracker}</job-tracker>
        <name-node>${nameNode}</name-node>
        <exec>/user/nz/printActionName.sh</exec>
        <argument><!-- PASS current action name i.e. hello_action  --></argument>
        <file>/user/nz/printActionName.sh#printActionName.sh</file>
        <capture-output/>
    </shell>
    <ok to="end"/>
    <error to="fail"/>
</action>

 

Posts: 1,567
Kudos: 289
Solutions: 240
Registered: ‎07-31-2013

Re: Oozie Workflow : How to get current action node name?

There's no current way to grab an action name via an EL function. What's your use-case behind this need?
Backline Customer Operations Engineer
Highlighted
New Contributor
Posts: 3
Registered: ‎07-08-2016

Re: Oozie Workflow : How to get current action node name?

Hi Harsh, I was looking for a similar functionality to query the action name of the previous action.

I've got a workflow where we process files with a set of different actions. If a file fails a certain test we move the files to a 'quarantine' folder and we would like to log the action which leads to this quarantining (the previous action name). Does that make sense or do you suggest an alternative approach? The logging in oozie doesn't provide us with a feature to easily detect these things.

Announcements