我将协调员定义如下:
<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文件中定义解决方案以及数据集节点的使用情况?
答案 0 :(得分: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