Oozie : Trigger Oozie Coordinator Jobs via RestAPI calls

It is also possible to execute the Oozie Coordinator Jobs using Rest API. It helps us to run it from any machine which doesnt have oozie client installed.

Create an xml file – oozie-testxml.xml – in the local of your Unix machine.

$ cat oozie-testxml.xml

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no”?><configuration>
<property><name>user.name</name><value><user running the app></value></property>
<property><name>oozie.coord.application.path</name><value><hdfs dir for coordinator xml></value></property>

Execute the workflow using the command

curl -X POST -H “Content-Type: application/xml” -d @oozie-testCoordCurl.xml “http://<host&gt;:11000/oozie/v2/jobs?action=start”

There is an easy way to get the xml file mentioned above. Set the following property.

export OOZIE_DEBUG=1

Then execute the workflow using the normal oozie command

oozie job -oozie http://<oozie-host&gt;:11000/oozie -config localcoordinator.properties -run

This would print the xml required to execute the workflow.


About shalishvj : My Experience with BigData

6+ years of experience using Bigdata technologies in Architect, Developer and Administrator roles for various clients. • Experience using Hortonworks, Cloudera, AWS distributions. • Cloudera Certified Developer for Hadoop. • Cloudera Certified Administrator for Hadoop. • Spark Certification from Big Data Spark Foundations. • SCJP, OCWCD. • Experience in setting up Hadoop clusters in PROD, DR, UAT , DEV environments.
This entry was posted in oozie. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s