【问题标题】:Rest API for Oozie workflow created through HUE通过 HUE 创建的用于 Oozie 工作流的 Rest API
【发布时间】:2017-03-19 07:36:13
【问题描述】:

我通过 Hue 界面创建了一个 Oozie 工作流程。我有几个与此相关的问题

一个。我可以看到创建的工作流 XML。但我没有看到 job.properties 文件。 Job.properties 存储在哪里?

b.有 REST API 可以提交通过编写 workflow.xml 和 job.properties 创建的 Oozie 作业。对于通过 HUE 创建的 oozie 工作流,REST API 是什么?任何样品都会有所帮助。

【问题讨论】:

    标签: hadoop oozie hue


    【解决方案1】:

    不想提出问题然后回答。但由于我不得不搜索某个时间,答案可能会对某人有所帮助......

    当使用 Hue 创建 Oozie 工作流时,Hue 创建工作流 xml 并将其放置在 HDFS 位置。以后可以复制此文件并将其放置在 HDFS 中的任何位置。

    要使 REST API 调用 oozie 以启动工作流,连同 workflow.xml,需要传递一个 config.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.
    

    一个示例 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>
    

    仍然没有回答的问题是 - 是否有 job.properties 文件。看起来它不存在且不需要。

    注意:由 romain 更新,job.properties 不存在,由 POST 正文内容替换。

    【讨论】:

      【解决方案2】:

      使用确实是使用 Oozie 的 REST API for submitting a job。如果您查看它,您会看到 job.properties 被替换为提供 POST 数据中的数据:

      例如

      <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
          <property>
              <name>user.name</name>
              <value>bansalm</value>
          </property>
      ....
      

      【讨论】:

        【解决方案3】:

        属性和工作流文件都在工作区文件夹中

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2020-06-05
          • 1970-01-01
          • 2017-04-05
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2020-07-06
          相关资源
          最近更新 更多