简体   繁体   English

Oozie从文件获取变量

[英]Oozie get a variable from a file

As an action in a workflow, Im writing the output of a Hive SELECT COUNT command to a text file in our hdfs. 作为工作流中的一项操作,我将Hive SELECT COUNT命令的输出写入到我们的hdfs中的文本文件中。

I need to make a decision in the workflow after this, based on the value in the output. 之后,我需要根据输出中的值在工作流程中做出决定。

I'm using HUE to construct this workflow. 我正在使用HUE构建此工作流程。

What I need to know is: 我需要知道的是:

  1. How to get this value as a variable, preferably not at the start of the workflow as it will be generated by the initial action. 如何获取此值作为变量,最好不要在工作流开始时获取,因为它将由初始操作生成。
  2. The syntax in the oozie decision for this variable. oozie决定此变量的语法。

I've tried my best to piece together other answers to similar questions but there's a few blank spaces I hope to fill in. 我已尽力将其他类似问题的答案拼凑在一起,但我希望填补一些空白。

I'll be so grateful for any guidance! 我将非常感谢您的指导! Thanks! 谢谢!

I would go for the Java path and capture-output . 我会选择Java路径并capture-output Oozie supports the Kerberos delegation using credentials ( https://oozie.apache.org/docs/4.2.0/DG_ActionAuthentication.html ) so you should not need to authenticate within Java; Oozie支持使用凭据( https://oozie.apache.org/docs/4.2.0/DG_ActionAuthentication.html )进行Kerberos委派,因此您无需在Java中进行身份验证; just use a standard JDBC connection 只需使用标准的JDBC连接

We faced this kind of situation, in which we changed from Hive action to shell action. 我们遇到了这种情况,我们从Hive动作变为shell动作。

We were authenticating using Kerberos and using Hive Server2 and passing the count from shell action to the next action. 我们正在使用Kerberos和Hive Server2进行身份验证,并将计数从外壳操作传递到下一个操作。

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

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