我是 Oozie 的新手,我读过一些 Oozie shell 操作示例,但这让我对某些事情感到困惑。
我见过一些例子,但没有<file>
tag.
一些例子,比如在 Cloudera 中here http://blog.cloudera.com/blog/2013/03/how-to-use-oozie-shell-and-java-actions/,在文件标记中重复 shell 脚本:
<shell xmlns="uri:oozie:shell-action:0.2">
<exec>check-hour.sh</exec>
<argument>${earthquakeMinThreshold}</argument>
<file>check-hour.sh</file>
</shell>
而在奥兹的网站 https://oozie.apache.org/docs/4.1.0/DG_ShellActionExtension.html#Shell_Action,编写shell脚本(参考${EXEC}
来自 job.properties,它指向 script.sh 文件)两次,用 # 分隔。
<shell xmlns="uri:oozie:shell-action:0.1">
...
<exec>${EXEC}</exec>
<argument>A</argument>
<argument>B</argument>
<file>${EXEC}#${EXEC}</file>
</shell>
我还看到过一些示例,其中路径(HDFS 还是本地?)前置在script.sh#script.sh
内<file>
tag.
<shell xmlns="uri:oozie:shell-action:0.1">
...
<exec>script.sh</exec>
<argument>A</argument>
<argument>B</argument>
<file>/path/script.sh#script.sh</file>
</shell>
据我了解,任何shell脚本文件都可以包含在工作流HDFS路径中(与workflow.xml所在的路径相同)。
有人可以解释这些例子中的差异以及如何<exec>
, <file>
, script.sh#script.sh
,以及/path/script.sh#script.sh
被使用?