Oozie done-flag EL functions

时间:2015-07-28 15:44:40

标签: oozie oozie-coordinator

I am trying to use the built in or EL functions provided by oozie in tag of oozie-coordinator xml, but seems like its not supported? Does anyone know of any other way to declare this?

Our done-flags have dates in them.

<done-flag>${YEAR}${MONTH}${DAY}.done</done-flag>
OR
<done-flag>${coord:formatTime(coord:actualTime(), 'yyyyMMdd')}</done-flag>

I get the following error when launching the oozie coordinator workflow.

Error: E1004 : E1004: Expression language evaluation error, 
Unable to evaluate :${coord:formatTime(coord:actualTime(), 'yyyyMMdd')}:

Does anyone know of a way to achieve dynamic done-flag names?

2 个答案:

答案 0 :(得分:1)

不是100%肯定你想做什么。

我的理解是协调器在运行工作流之前等待名为“done-flag”的文件。 然后“coord:actualTime()”函数可用于了解工作流实际启动的时间。

=&GT; documentation应强调在大多数情况下,“协调员行动”这个短语实际上意味着“工作流程”......

如果您想在协调员等待时查看时钟时间,关键字YEAR - MONTH - DAY - HOUR - MINUTE是您唯一的希望。

答案 1 :(得分:0)

I got it working using the following way, by using the YEAR, MONTH, DAY variables in the uri-template and emptying out the .

$long=$_Session['long'];
$lat=$_Session['lat'];

I came to know from the logs that oozie first checks if there is a directory with the name specified by uri-template, if not then it checks if there is a file specified by the uri-template.

  <uri-template>
    /donemarkers/dependency-job/${YEAR}${MONTH}${DAY}.done
  </uri-template>
  <!--<done-flag>${YEAR}${MONTH}${DAY}.done</done-flag>-->
  <done-flag></done-flag>