gpt4 book ai didi

hadoop - 如何读取子工作流(单独的 xml 文件)中的配置属性?

转载 作者:可可西里 更新时间:2023-11-01 15:20:31 24 4
gpt4 key购买 nike

我在单独的子工作流文件中读取配置属性时收到下面提到的错误消息。我正在发布示例代码。感谢您帮助解决此问题。谢谢!

2019-01-17 08:44:52,885 WARN ActionStartXCommand:523 - SERVER[localhost] USER[user1] GROUP[-] TOKEN[] APP[subWorkflow] JOB[0338958-190114130857167-oozie-oozi-W] Action [0338958-190114130857167-oozie-oozi-W@subWorkflowAction1] ActionStartXCommand 中的 ELExceptionjavax.servlet.jsp.el.E​​LException:无法解析变量 [jobtracker]

协调器作业触发命令

oozie job --oozie http://localhost:11000/oozie --config /home/user/oozie-scripts/props/job.properties -run

job.properties

namenode=hdfs://localhost
workflowpath=${namenode}/user/user1/oozie-workflow/parentWorkflow.xml
frequency=25
starttime=2018-08-06T13\:29Z
endtime=2108-08-06T13\:29Z
timezone=UTC
oozie.coord.application.path=${namenode}/user/user1/oozie-workflow/coordinator.xml
jobtracker=http://localhost:8088
scriptpath=/user/user1/oozie-workflow

协调员

<coordinator-app name="sampleCoord" frequency="${frequency}" start="${starttime}" end="${endtime}" timezone="${timezone}" xmlns="uri:oozie:coordinator:0.4">
<action>
<workflow>
<app-path>${workflowpath}</app-path>
</workflow>
</action>
</coordinator-app>

父级工作流程

<workflow-app xmlns = "uri:oozie:workflow:0.4" name = "Parent-Workflow">
<start to = "workflowAction1" />
<action name = "workflowAction1">
<sub-workflow>
<app-path>/user/user1/oozie-workflow/subWorkflow1.xml</app-path>
</sub-workflow>
<ok to = "end" />
<error to = "end" />
</action>

子工作流程

<workflow-app xmlns = "uri:oozie:workflow:0.4" name = "subWorkflow">
<start to = "subWorkflowAction1" />
<action name = "subWorkflowAction1">
<hive xmlns = "uri:oozie:hive-action:0.4">
<job-tracker>${jobtracker}</job-tracker>
<script>${scriptpath}/dropTempTable.hive</script>
<param>Temp_TableVar=${concat(concat("HBASE_",replaceAll(wf:id(),"- ","_")),"_TEMP")}</param>
</hive>

<ok to = "end" />
<error to = "kill_job" />
</action>


<kill name = "kill_job">
<message>Job failed</message>
</kill>
<end name = "end" />
</workflow-app>

最佳答案

在父工作流 xml 文件中添加传播配置标签解决了这个问题。

<workflow-app xmlns = "uri:oozie:workflow:0.4" name = "Parent-Workflow">
<start to = "workflowAction1" />
<action name = "workflowAction1">
<sub-workflow>
<app-path>/user/user1/oozie-workflow/subWorkflow1.xml</app-path>
<propagate-configuration />
</sub-workflow>
<ok to = "end" />
<error to = "end" />

关于hadoop - 如何读取子工作流(单独的 xml 文件)中的配置属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54237876/

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