c 做网站加载多个图片/seo搜索引擎优化是什么意思
目录
- 1. 准备
- 2.编辑job.properties文件
- 3.编辑workflow.xml文件
- 4.上传上述文件
- 5.执行配置文件
1. 准备
1.1、开启hadoop Oozie
1.2、然后来到/opt/modules/cdh/oozie-4.0.0-cdh5.3.6/oozie-apps
2.编辑job.properties文件
参数看不懂的话,可以参考这个链接
Oozie 一个简单的测试:使用Oozie调度Shell脚本链接描述
nameNode=hdfs://hadoop201:8020
jobTracker=hadoop202:8032
queueName=default
examplesRoot=oozie-apps
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/shell2
3.编辑workflow.xml文件
<workflow-app xmlns="uri:oozie:workflow:0.4" name="shell-wf"><start to="p1-shell-node"/><action name="p1-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>mkdir</exec><argument>/opt/modules/oozie_output1</argument><capture-output/></shell><ok to="forking"/><error to="fail"/></action><action name="p2-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>mkdir</exec><argument>/opt/modules/oozie_output2</argument><capture-output/></shell><ok to="joining"/><error to="fail"/></action><action name="p3-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>mkdir</exec><argument>/opt/modules/oozie_output3</argument><capture-output/></shell><ok to="joining"/><error to="fail"/></action><action name="p4-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>mkdir</exec><argument>/opt/modules/oozie_output4</argument><capture-output/></shell><ok to="end"/><error to="fail"/></action><fork name="forking"><path start="p2-shell-node"/><path start="p3-shell-node"/></fork><join name="joining" to="p4-shell-node"/><kill name="fail"><message>Shell action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message></kill><end name="end"/>
</workflow-app>
4.上传上述文件
[hadoop@hadoop201 hadoop-2.5.0-cdh5.3.6]$ bin/hadoop fs -put /opt/modules/cdh/oozie-4.0.0-cdh5.3.6/oozie-apps/shell2 /user/hadoop/oozie-apps/shell2
5.执行配置文件
[hadoop@hadoop201 oozie-4.0.0-cdh5.3.6]$ bin/oozie job -oozie http://hadoop201:11000/oozie -config oozie-apps/shell2/job.properties -run