标签:cat user att alt exec .sh last ble exe
$ cp -r ./examples/apps/shell/ my-apps/
nameNode=hdfs://bigdata-00:8020
jobTracker=bigdata-00:8032
queueName=default
examplesRoot=user/wulei/my-apps/shell
#定义workflow.xml路劲
oozie.wf.application.path=${nameNode}/${examplesRoot}/workflow.xml
#定义一个变量名存储shell文件名
EXEC=oozie.sh
<workflow-app xmlns="uri:oozie:workflow:0.4" name="shell-wf">
<start to="shell-node"/>
<action name="shell-node">
<shell xmlns="uri:oozie:shell-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<exec>${EXEC}</exec>
<!-- 定义shell脚本路劲 -->
<file>${nameNode}/${examplesRoot}/${EXEC}#${EXEC}</file> <!--Copy the executable to compute node‘s current working directory -->
</shell>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Shell action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
Oozie-自定义实现WorkFlow中shell action
标签:cat user att alt exec .sh last ble exe
原文地址:http://www.cnblogs.com/ilinuxer/p/6804402.html