接下来的情况是:只有在 "/user/task" 目录中,文件 "_SUCCESS" 存在时才会触发协调器,但是当您创建协调器时,只有一个选项“多久一次?”,所以我需要以某种方式重写coordinator.xml。有人能帮我吗?下一个是coordinator.xml的内容:
<coordinator-app name="My_Coordinator"
frequency="0 0 * * *"
start="${start_date}" end="${end_date}" timezone="America/Los_Angeles"
xmlns="uri:oozie:coordinator:0.2"
>
<controls>
<execution>FIFO</execution>
</controls>
<action>
<workflow>
<app-path>${wf_application_path}</app-path>
<configuration>
<property>
<name>oozie.use.system.libpath</name>
<value>True</value>
</property>
<property>
<name>start_date</name>
<value>2015-11-09T22:46Z</value>
</property>
<property>
<name>end_date</name>
<value>2015-11-16T22:46Z</value>
</property>
</configuration>
</workflow>
</action>
</coordinator-app>发布于 2015-11-11 05:13:45
您应该在协调器配置中声明一个数据集:
<datasets>
<dataset name="some-name" frequency="${coord:days(1)}" initial-instance="..." timezone="...">
<uri-template>
...
</uri-template>
</dataset>
</datasets>工作流程将每天运行。
关于数据集,请参见更多。
发布于 2015-11-13 12:17:18
这个问题不是通过更改xml文件,而是通过使用下面的bash脚本来解决的
if ! hadoop fs -test -e /user/task/_SUCCESS; then
echo file not found
exit 1
fi
echo file found
exit 0https://stackoverflow.com/questions/33627683
复制相似问题