Multiple JAVA actions in Oozie workflow

给你一囗甜甜゛ 提交于 2019-12-11 10:05:59

问题


I read the documentation that it isn't possible to create a loop in a workflow, but I need to invoke the main method separately each time with the list item - hence need to create a loop.

One solution was to invoke the workflow again using sub-workflow.

Is there any other solution to this? Like using coordinator jobs?


回答1:


Some possible 'hack' solutions that i can think of:

  • Create a custom java action as you say, that uses the Oozie Client API to run several workflows (one for each item in your list). you can then either run the items in parallel or serial and poll for success / failure.
  • Another option, similar to the above would be to use some templateing language like Apache Velocity and have your custom action take a template and expand it (generating a workflow xml file on the fly), before again using the Oozie Client API to run this generated workflow.

I like the second option more as you can make a generic solution.



来源:https://stackoverflow.com/questions/14573919/multiple-java-actions-in-oozie-workflow

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