Handling loops in oozie workflow

二次信任 提交于 2019-12-04 11:18:11

You can simulate loops using recursion. The key idea is that a workflow calls itself using a sub-workflow action that points to the workflow file that contains the action node.

The recursion must be stopped using a decision node.

On my blog you can find a complete example for this.

DAG = Directed Acyclic Graph. This means that there cannot be any cycles (loops) in the graph formed by your workflow.

http://en.wikipedia.org/wiki/Directed_acyclic_graph

You can implemented loops by using sub-workflow concept. The idea is to extract out the action(s) to be repeated into a subflow and call it from the main flow as many times as you want. Read more here: How-to: Shorten Your Oozie Workflow Definitions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!