Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Oozie Workflow : How to get current action node name?

Highlighted

Oozie Workflow : How to get current action node name?

New Contributor

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>

 

2 REPLIES 2

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

Master Guru
There's no current way to grab an action name via an EL function. What's your use-case behind this need?

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

New Contributor

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.

Don't have an account?
Coming from Hortonworks? Activate your account here