0

我将协调器定义如下:

<coordinator-app name="CoordApp-DataExporter"
    frequency="${coord:minutes(10)}"
    start="${startTime}"
    end="${endTime}"
    timezone="${timeZoneDef}"
    xmlns="uri:oozie:coordinator:0.2">
    <controls>
        <timeout>20</timeout>
        <concurrency>6</concurrency>
        <execution>FIFO</execution>
    </controls>
    <datasets>
        <dataset name="inputDS" frequency="${coord:minutes(10)}" initial-instance="${startTime}" timezone="${timeZoneDef}">
           <uri-template>${triggerDatasetDir}</uri-template>
        </dataset>
    </datasets>
    <input-events>
        <data-in name="CoordAppTrigDepInput" dataset="inputDS">
           <instance>${startTime}</instance>
        </data-in>
    </input-events>
    <action>
        <workflow>
          <app-path>${workflowAppDataExporterPath}</app-path>
        </workflow>
    </action>
</coordinator-app>

我将开始时间设置为当前时间,当我尝试这项工作时,它总是处于等待状态。

你能在ooxie的cordinator.xml文件中定义解决方案以及数据集节点的使用吗?

4

1 回答 1

1

尝试将其更改为以下内容:

<coordinator-app name="CoordApp-DataExporter"
    frequency="${coord:minutes(10)}"
    start="${startTime}"
    end="${endTime}"
    timezone="${timeZoneDef}"
    xmlns="uri:oozie:coordinator:0.2">
    <controls>
        <timeout>20</timeout>
        <concurrency>6</concurrency>
        <execution>FIFO</execution>
    </controls>
    <datasets>
        <dataset name="inputDS" frequency="${coord:minutes(10)}" initial-instance="${startTime}" timezone="${timeZoneDef}">
           <uri-template>${triggerDatasetDir}/${YEAR}/${MONTH}/${DAY}/${HOUR}_${MINUTE}</uri-template>
        </dataset>
    </datasets>
    <input-events>
        <data-in name="CoordAppTrigDepInput" dataset="inputDS">
           <instance>${coord:current(0)}</instance>
        </data-in>
    </input-events>
    <action>
        <workflow>
          <app-path>${workflowAppDataExporterPath}</app-path>

          <configuration>
            <property>
                <name>property1</name>
                <value>${coord:dataIn('CoordAppTrigDepInput')}</value>
            </property>
        </workflow>
    </action>
</coordinator-app>

要测试协调器,您可以尝试 oozie 命令行的 -dryrun 功能 - http://oozie.apache.org/docs/3.3.2/DG_CommandLineTool.html#Dryrun_of_Coordinator_Job

于 2013-10-27T14:45:37.707 回答