使用Oozie执行shell脚本,作业始终仅处于运行状态
我需要有关oozie的帮助,我正在尝试运行一个创建HDFS文件夹的脚本,当我执行oozie时,它仅在运行状态下显示,是否有人可以帮助我确定我的workflow.xml或jo.properties是否有任何错误。我尝试验证workflow.xml,但没有显示任何错误 workflow.xml使用Oozie执行shell脚本,作业始终仅处于运行状态,shell,hadoop,oozie,Shell,Hadoop,Oozie,我需要有关oozie的帮助,我正在尝试运行一个创建HDFS文件夹的脚本,当我执行oozie时,它仅在运行状态下显示,是否有人可以帮助我确定我的workflow.xml或jo.properties是否有任何错误。我尝试验证workflow.xml,但没有显示任何错误 workflow.xml <workflow-app xmlns='uri:oozie:workflow:0.3' name='shell-wf'> <start to='shell1' /> <
<workflow-app xmlns='uri:oozie:workflow:0.3' name='shell-wf'>
<start to='shell1' />
<action name='shell1'>
<shell xmlns="uri:oozie:shell-action:0.1">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<exec>/user/nathalok/run.sh</exec>
<file>/user/nathalok/run.sh#run.sh</file>
</shell>
<ok to="end" />
<error to="fail" />
</action>
<kill name="fail">
<message>Script failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name='end' />
</workflow-app>
按以下顺序执行命令:
-bash-4.1$ oozie job -oozie http://myserver.com:11000/oozie -config job.properties -submit
job: 0000209-150501165011472-oozie-oozi-W
-bash-4.1$ oozie job -oozie http://myserver.com:11000/oozie -start 0000209-150501165011472-oozie-oozi-W
-bash-4.1$ oozie job -oozie http://myserver.com:11000/oozie -info 0000209-150501165011472-oozie-oozi-W
Job ID : 0000209-150501165011472-oozie-oozi-W
------------------------------------------------------------------------------------------------------------------------------------
Workflow Name : shell-wf
App Path : hdfs://hdfspath/user/userid
Status : RUNNING
Run : 0
User : userid
Group : -
Created : 2015-05-06 12:16 GMT
Started : 2015-05-06 12:16 GMT
Last Modified : 2015-05-06 12:16 GMT
Ended : -
CoordAction ID: -
Actions
------------------------------------------------------------------------------------------------------------------------------------
ID Status Ext ID Ext Status Err Code
------------------------------------------------------------------------------------------------------------------------------------
0000209-150501165011472-oozie-oozi-W@:start: OK - OK -
------------------------------------------------------------------------------------------------------------------------------------
0000209-150501165011472-oozie-oozi-W@shell1 PREP - - -
------------------------------------------------------------------------------------------------------------------------------------
使用Oozie时,不需要使用shell脚本来创建HDFS文件夹,而是使用内置的- 例如:
<action name="createFolder">
<fs>
<mkdir path="/my/folder" />
</fs>
<ok to="end"/>
<error to="fail"/>
</action>
到目前为止,我只添加了文件夹创建命令,我将添加一个大脚本,在现实中进行数据处理。主要的问题是,我能够从色调运行脚本,但从后端运行时遇到问题。
<action name="createFolder">
<fs>
<mkdir path="/my/folder" />
</fs>
<ok to="end"/>
<error to="fail"/>
</action>