gpt4 book ai didi

hadoop - Oozie Coordinator - 自定义 EL 函数

转载 作者:可可西里 更新时间:2023-11-01 14:56:02 26 4
gpt4 key购买 nike

我需要创建自定义 EL 函数并在 uri 模板中使用它(相当于 YEAR、MONTH)。有可能的? oozie-site.xml 中coordinator这个区域的关键配置是什么?

最佳答案

属性 oozie.service.ELService.ext.functions.workflow 是您必须包含扩展 EL 函数到关联类和方法的所有映射的属性。多个映射条目以逗号分隔。

<property>
<name>oozie.service.ELService.ext.functions.workflow</name>
<value>
yourELkey=fully_quallified_class_name#static_method_name
</value>
<description>
EL functions declarations, separated by commas, format is
[PREFIX:]NAME=CLASS#METHOD. This property is a convenience
property to add extensions to the built in executors without
having to include all the built in ones.
</description>
</property>

有关如何打包和部署的更多信息,您可以引用 this .

编辑:由于您对类似于 YEAR、MONTH 的协调器的 EL 函数感兴趣,您可以查看以下属性(记录在 oozie-default.xml 中,您需要将其添加到 oozie-site.xml因为前者只是文档)- oozie.service.ELService.functions.coord-job-submit-freqoozie.service.ELService.ext.functions.coord-job-submit-freq

<property>
<name>oozie.service.ELService.functions.coord-job-submit-freq</name>
<value>
coord:days=org.apache.oozie.coord.CoordELFunctions#ph1_coord_days,
coord:months=org.apache.oozie.coord.CoordELFunctions#ph1_coord_months,
coord:hours=org.apache.oozie.coord.CoordELFunctions#ph1_coord_hours,
coord:minutes=org.apache.oozie.coord.CoordELFunctions#ph1_coord_minutes,
coord:endOfDays=org.apache.oozie.coord.CoordELFunctions#ph1_coord_endOfDays,
coord:endOfMonths=org.apache.oozie.coord.CoordELFunctions#ph1_coord_endOfMonths,
coord:conf=org.apache.oozie.coord.CoordELFunctions#coord_conf,
coord:user=org.apache.oozie.coord.CoordELFunctions#coord_user,
hadoop:conf=org.apache.oozie.action.hadoop.HadoopELFunctions#hadoop_conf
</value>
<description>
EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
</description>
</property>

<property>
<name>oozie.service.ELService.ext.functions.coord-job-submit-freq</name>
<value>
</value>
<description>
EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
This property is a convenience property to add extensions to the built in executors without having to
include all the built in ones.
</description>
</property>

关于hadoop - Oozie Coordinator - 自定义 EL 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46602506/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com