Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Is there anyway to run multiple oozie jobs in sequence.

New Contributor


Is there anyway to run multiple oozie jobs in sequence.

For example: I have three applications, assume A1,A2,A3. A2 should trigger once A1 has completed execution and A3 should trigger once A2 has completed execution. How can this be acheived using Oozie.



@Saumidh Mhatre

Yes this should be possible by specifying multiple actions in single workflow.xml

<?xml version="1.0" ?>
<workflow-app name="sample" xmlns="uri:oozie:workflow:0.5">
 <start to="query1"/>
 <action name="query1">
    <delete path="/tmp/query1"/>
   <java-opts>-cp $CLASSPATH:/usr/hdp/current/hbase-client/lib/hbase-protocol.jar:/etc/hbase/conf</java-opts>
  <ok to="metrics"/>
  <error to="kill"/>
 <action name="metrics">
  <shell xmlns="uri:oozie:shell-action:0.2">
  <ok to="end"/>
  <error to="kill"/>
 <kill name="kill">
  <message>Workflow action failed, killing workflow</message>
 <end name="end"/>

Rising Star

@Saumidh Mhatre

And FYI, most actions are asynchronous, so one has to end before the next begins, which you mention you want to happen. For a list of some of the actions available and which are synchronous vs asynchronous, see the Workflow Action Types table in the Workflow Management (WFM) guide (the table applies even if you aren't using WFM, as WFM is based on Oozie).

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.