简体   繁体   English

Oozie蜂巢动作工作流程

[英]Oozie workflow for hive action

I am using oozie to execute few hive queries one after another and if a query fails it will send error email that a particular hive query is failed. 我正在使用oozie依次执行几个配置单元查询,如果查询失败,它将发送错误电子邮件,说明特定的配置单元查询失败。

Now I have to implement another email triggers based on the result of each hive query. 现在,我必须根据每个配置单元查询的结果来实现另一个电子邮件触发器。 So how can we do that ? 那么我们该怎么做呢? Its like if a query returns any result then send the results to the email and continue executing remaining hive queries. 就像查询返回任何结果一样,然后将结果发送到电子邮件并继续执行其余的配置单元查询。 There should be no stoppings of oozie workflow execution irrespective of query returns value or not. 无论是否返回查询值,都不应停止oozie工作流执行。

In short, if it returns value then send email and continue if it didnt return value also it should continue executing. 简而言之,如果它返回值,则发送电子邮件,如果没有返回值,则继续发送,也应继续执行。

Thank you in advance. 先感谢您。

If you want to make decisions based on previous step its better to use shell actions( hive -e option to execute query) along with capture_output tag in oozie. 如果您想基于上一步做出决定,最好在oozie中使用shell动作(使用hive -e选项执行查询)以及capture_output标记。 Or better use java actions with hive jdbc connection to execute hive queries where you can utilize java for doing all logical looping and decision making. 或者更好地将Java动作与配置单元jdbc连接一起使用以执行配置单元查询,在这里您可以利用Java进行所有逻辑循环和决策。

As oozie doesn't support cycles/loops of execution you might need to repeat the email action in workflow based on the decision making and flow. 由于oozie不支持执行周期/循环,因此您可能需要根据决策和流程在工作流中重复执行电子邮件操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM