我通过 Hue 界面创建了 Oozie 工作流程。我有几个与此相关的问题
A。我可以看到创建的工作流程 XML。但我没有看到 job.properties 文件。Job.properties 存储在哪里?
b. 有 REST API 可以提交通过编写工作流程.xml 和 job.properties 创建的 Oozie 作业。对于通过 HUE 创建的 oozie 工作流程,REST API 是什么?任何样本都会有帮助。
不想提出问题然后回答。但由于我不得不搜索一段时间,答案可能会对某人有所帮助......
使用 Hue 创建 Oozie 工作流时,Hue 将创建工作流 xml 并将其放置在 HDFS 位置。稍后可以复制该文件并将其放置在 HDFS 中的任何位置。
要对 oozie 进行 REST API 调用以启动工作流,需要传递 config.xml 以及工作流.xml。为了获取要在 config.xml 中填充的值,我使用此方法来查找详细信息。
Submit the job via Hue.
Open the Oozie Web UI. (You can get the link from the Ambari. Click on oozie and look at the quick links at the top).
In the Oozie Web UI, the job that is executed will be shown in list view.
One of the tab is the Job Configuration.
The content of the Job Configuration will be the content in the config.xml that need to be passed along with the REST API.
Run Code Online (Sandbox Code Playgroud)
示例 URL 为
http://IP-where-Oozie-server-runs:11000/oozie/v1/jobs?action=start
要启动的实际工作流程存在于 config.xml 中
<property>
<name>oozie.wf.application.path</name>
<value>hdfs://Named-node-name:8020/location/to/workflow.xml </value>
</property>
Run Code Online (Sandbox Code Playgroud)
仍然没有回答的问题是 - 是否有 job.properties 文件。看起来它不存在并且不需要。
注意:根据 romain 的更新,job.properties 不存在,并被 POST 正文内容替换。
| 归档时间: |
|
| 查看次数: |
5248 次 |
| 最近记录: |