我正在尝试理解一个事件,但不能理解输入事件标签do.can是什么,请您帮我理解一下,这个工作流什么时候会被触发。
<coordinator-app name="MY_APP" frequency="5" start="2009-02-01T00:00Z" end="2009-02-07T00:00Z" timezone="UTC" xmlns="uri:oozie:coordinator:0.1">
<datasets>
<dataset name="input1" frequency="5" initial-instance="2009-01-01T00:00Z" timezone="UTC">
<uri-template>hdfs://localhost:9000/tmp/revenue_feed/${YEAR}/${MONTH}/${DAY}/${HOUR}/${MINUTE}</uri-template>
</dataset>
</datasets>
<input-events>
<data-in name="coordInput1" dataset="input1">
<start-instance>${coord:minutes(-10)}</start-instance>
<end-instance>${coord:current(-5)}</end-instance>
</data-in>
</input-events>
<action>
<workflow>
<app-path>hdfs://localhost:9000/tmp/workflows</app-path>
</workflow>
</action>
</coordinator-app>发布于 2019-09-25 23:02:22
通过使用<start-instance>和<end-instance>提供一系列数据集实例,<input-events>定义了应该考虑运行的数据集。这些数据集实例在<dataset>块中定义。
${coord:current(0)}是在时间上最接近但不晚于协调器的标称时间的数据集。${coord:current(-1)}指的是${coord:current(0)}之前的数据集。
我不确定您的示例是否正确,因为它使用了${coord:minutes()}。我相信在<input-events>中只支持current(n)或latest(n)。即使支持分钟(N),您的范围看起来也不正确,因为您的开始和结束间隔是向后的。这意味着,如果您的数据集频率为5分钟,则coord:minutes(-10)比coord:current(-5)更接近当前。
根据我的经验,这是Oozie中最复杂的主题,而我自己还没有掌握这个概念。我推荐O‘’Reilly的书Apache Oozie。它将为您提供有关此主题的更多详细信息。
https://stackoverflow.com/questions/58042234
复制相似问题