关于oozie调用shell的一个事例
www.MyException.Cn 网友分享于:2014-03-19 浏览:82次
关于oozie调用shell的一个例子
workflow.xml
<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>t.sh</exec> <argument>path=/dp/bin/test.sh</argument> </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>
job.properties
nameNode=hdfs://oozie jobTracker=master1:8032 queueName=default exampleRoot=tescomm oozie.wf.application.path=${nameNode}/user/${user.name}/${exampleRoot}/apps/shell/test
a.sh
ssh hadoop@master2 "${path}"