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.

how to get oozie coordinator id in the workflow

how to get oozie coordinator id in the workflow

Explorer

My requirement is to kill or stop coordinator which initiated a workflow in case any workflow action fails.

 

wf:id gives the id for the workflow.

 

is there any such fuction for coord??

 

if not, please suggest ways to pass coord it to workflow.

2 REPLIES 2
Highlighted

Re: how to get oozie coordinator id in the workflow

Explorer

The only I think is by redirecting the "oozie job  -oozie.... " to a file and accessing the from workflow to get the coordinate id.

Is there any other way to access the coordinate id in the instance workflow??

Highlighted

Re: how to get oozie coordinator id in the workflow

            
1) use the following config in the coordinator xml

        <configuration>
            <property>
                <name>coord_id</name>
                <value>${coord:actionId()}</value>
            </property>
        </configuration>
        
        
2) specify as following in worflow xml as similar to ${wf:id()}  for getting workflow id

       Coordinator ID:${coord_id}

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