Oozie coordinator having multiple workflow
Asked Answered
I

3

5

I have three Workflow XML files such as WF1 WF2 WF3. Can I link all these workflows in a single co-ordinator for the below actions? WF1 is Time dependent WF2 is File Dependency WF3 is No Dependency of anything.

Illsuited answered 30/10, 2014 at 9:20 Comment(0)
O
10

You can't link all three workflows in a single coordinator.

Instead of that you can link all three workflows in a seperate workflow xml(parent) file using "subworkflow" concept in oozie.(All three workflow files WF1, WF2, WF3 are mentioned as sub workflows in this parent workflow file)

Then you can use your coordinator xml file to schedule parent workflow file so that all three workflow files get linked.

Reference: https://bhatnagarankitblog.wordpress.com/2013/11/09/multiple-executions/

Octonary answered 28/10, 2015 at 9:11 Comment(1)
are we running multiple workflow from same coordinator.. see link below for reference.. #31583908 Please suggestGastrovascular
Z
7

Unfortunately, one oozie coordinator can only have one action/workflow. It's defined in xml schema : Oozie 4.01 CoordinatorFunctionalSpec.html#Oozie_Coordinator_Schema_0.4

<xs:complexType name="COORDINATOR-APP">
  <xs:sequence>
    ...
    <xs:element name="action" type="coordinator:ACTION" minOccurs="1" maxOccurs="1" />
    ...
</xs:complexType>

However, as the requester pointed out in comment section, Oozie does provide a way to bundle coordinator jobs together. Note that the dependency between jobs need to be managed by user as doc mentioned:

Bundle is a higher-level oozie abstraction that will batch a set of coordinator applications. The user will be able to start/stop/suspend/resume/rerun in the bundle level resulting a better and easy operational control.

More specififcally, the oozie Bundle system allows the user to define and execute a bunch of coordinator applications often called a data pipeline. There is no explicit dependency among the coordinator applications in a bundle. However, a user could use the data dependency of coordinator applications to create an implicit data application pipeline.

Zeitler answered 3/11, 2014 at 22:29 Comment(3)
Found solution using bundle. In bundle.xml we can have multiple coordinator jobs by which multiple workflows can be launched.Illsuited
Bundled job helps life cycle management of multiple jobs with one shot. It doesn't guarantee the order of your workflow execution by itself. In your case, it won't work if the desired execution sequence is WF1 -> WF2 -> WF3. Let me edit my answer for other users to get a full picture.Zeitler
How can an implicit dependency be indicated?Echolocation
G
2

No you cant link all three workflows in a single coordinator but you can create seperate coordinator for each workflow and link them using the bundle.

To learn more, coordinate jobs link

Gonroff answered 27/11, 2014 at 9:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.