我通过使用 uri-template 中的 YEAR、MONTH、DAY 变量并清空 .
<uri-template>
/donemarkers/dependency-job/${YEAR}${MONTH}${DAY}.done
</uri-template>
<!--<done-flag>${YEAR}${MONTH}${DAY}.done</done-flag>-->
<done-flag></done-flag>
我从日志中了解到,oozie 首先检查是否存在具有 uri-template 指定名称的目录,如果没有,则检查是否存在 uri-template 指定的文件。
2015-07-28 19:40:46,225 INFO CoordActionInputCheckXCommand:539 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0131647-140520191754742-oozie-oozi-C] ACTION[0131647-140520191754742-oozie-oozi-C@2] [0131647-140520191754742-oozie-oozi-C@2]::ActionInputCheck:: In checkResolvedUris...
2015-07-28 19:40:46,225 INFO CoordActionInputCheckXCommand:539 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0131647-140520191754742-oozie-oozi-C] ACTION[0131647-140520191754742-oozie-oozi-C@2] [0131647-140520191754742-oozie-oozi-C@2]::ActionInputCheck:: In checkListOfPaths: /donemarkers/dependency-job/20150725.done is Missing.
2015-07-28 19:40:46,241 INFO CoordActionInputCheckXCommand:539 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[0131647-140520191754742-oozie-oozi-C] ACTION[0131647-140520191754742-oozie-oozi-C@2] [0131647-140520191754742-oozie-oozi-C@2]::ActionInputCheck:: File:/donemarkers/dependency-job/20150725.done, Exists? :true