這篇文章主要介紹“Oozie-4.1.0和hadoop-2.7.1怎么進行編譯”,在日常操作中,相信很多人在Oozie-4.1.0和hadoop-2.7.1怎么進行編譯問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”O(jiān)ozie-4.1.0和hadoop-2.7.1怎么進行編譯”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!
成都創(chuàng)新互聯(lián)專注于企業(yè)成都全網營銷推廣、網站重做改版、東寧網站定制設計、自適應品牌網站建設、H5響應式網站、成都做商城網站、集團公司官網建設、外貿營銷網站建設、高端網站制作、響應式網頁設計等建站業(yè)務,價格優(yōu)惠性價比高,為東寧等各大城市提供網站開發(fā)制作服務。
一、環(huán)境
maven-3.3.0
hadoop-2.7.1
二、編譯
[root@hftclclw0001 opt]# pwd /opt [root@hftclclw0001 opt]# wget http://apache.mirrors.pair.com/oozie/4.1.0/oozie-4.1.0.tar.gz [root@hftclclw0001 opt]# tar -zxvf oozie-4.1.0.tar.gz [root@hftclclw0001 opt]# cd oozie-4.1.0 #默認 #sqoop.version=1.4.3 #hive.version=0.13.1 => 修改為其他,編譯出錯 #hbase.version=0.94.2 => 修改為其他,編譯出錯 #pig.version=0.12.1 #hadoop.version=2.3.0 => 最新版本是2.3.0 但是支持2.7.1 #tomcat.version=6.0.43 [root@hftclclw0001 opt]# ./bin/mkdistro.sh -DskipTests -Phadoop-2 -Dsqoop.version=1.4.6 ... ... ... INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 07:25 min [INFO] Finished at: 2016-06-19T12:46:07+00:00 [INFO] Final Memory: 128M/1178M [INFO] ------------------------------------------------------------------------ Oozie distro created, DATE[2016.06.19-12:38:39GMT] VC-REV[unavailable], available at [/opt/oozie-4.1.0/distro/target]
三、配置
[root@hftclclw0001 opt]# pwd /opt [root@hftclclw0001 opt]# mkdir Oozie [root@hftclclw0001 opt]# cd Oozie [root@hftclclw0001 Oozie]# pwd /opt/Oozie [root@hftclclw0001 Oozie]# cp ../oozie-4.1.0/distro/target/oozie-4.1.0-distro.tar.gz ./ [root@hftclclw0001 Oozie]# tar -zxvf oozie-4.1.0-distro.tar.gz [root@hftclclw0001 Oozie]# cd oozie-4.1.0 [root@hftclclw0001 oozie-4.1.0]# pwd /opt/Oozie/oozie-4.1.0 [root@hftclclw0001 oozie-4.1.0]# mkdir libext [root@hftclclw0001 oozie-4.1.0]# cp /opt/oozie-4.1.0/hadooplibs/hadoop-2/target/hadooplibs/hadooplib-2.3.0.oozie-4.1.0/* ./libext [root@hftclclw0001 oozie-4.1.0]# cd libext [root@hftclclw0001 libext]# curl -O http://archive.cloudera.com/gplextras/misc/ext-2.2.zip 下載MySQL驅動放入libext,因為用mysql作為元數(shù)據(jù)庫,默認為Derby [root@hftclclw0001 libext]# ll total 26452 ... -rw------- 1 root root 848401 Jun 19 13:41 mysql-connector-java-5.1.25-bin.jar ... [root@hftclclw0001 libext]# cd .. [root@hftclclw0001 oozie-4.1.0]# pwd /opt/Oozie/oozie-4.1.0 [root@hftclclw0001 oozie-4.1.0]# ./bin/oozie-setup.sh prepare-war [root@hftclclw0001 oozie-4.1.0]# ./bin/oozie-setup.sh sharelib create -fs hdfs://localhost:9000 創(chuàng)建Oozie數(shù)據(jù)庫 [root@hftclclw0001 oozie-4.1.0]# mysql -uroot -p mysql>CREATE DATABASE OOZIEDB; mysql>GRANT ALL PRIVILEGES ON OOZIEDB.* TO oozie IDENTIFIED BY "oozie"; mysql>FLUSH PRIVILEGES; 配置conf/oozie-site.xml oozie.service.JPAService.jdbc.driver oozie.service.JPAService.jdbc.url oozie.service.JPAService.jdbc.username oozie.service.JPAService.jdbc.password [root@hftclclw0001 oozie-4.1.0]# ./bin/ooziedb.sh create db -run 配置etc/hadoop/core-site.xml,配置oozie的proxyuserhadoop.proxyuser.$USER.hosts * $USER替換為oozie service的用戶,或oozie,或root等 [root@hftclclw0001 oozie-4.1.0]# ./oozied.sh start hadoop.proxyuser.$USER.groups */value>
四、examples
job.properties
nameNode=hdfs://nameservice1 #nameNode=hdfs://nameservice1 ==> HA #nameNode=hdfs://${namenode}:8020 ==> single namenode jobTracker=dapdevhmn001.qa.webex.com:8032 #jobTracker=rm1,rm2 ==> HA #jobTracker(yarn.resourcemanager.address)=10.224.243.124:8032 queueName=default examplesRoot=examples #oozie.use.system.libpath=true oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/map-reduce outputDir=map-reduce
workflow.xml
${jobTracker} ${nameNode} mapred.job.queue.name ${queueName} mapred.mapper.class org.apache.oozie.example.SampleMapper mapred.reducer.class org.apache.oozie.example.SampleReducer mapred.map.tasks 1 mapred.input.dir /user/${wf:user()}/${examplesRoot}/input-data/text mapred.output.dir /user/${wf:user()}/${examplesRoot}/output-data/${outputDir} Map/Reduce failed, error message[${wf:errorMessage(wf:lastErrorNode())}]
lib/oozie-examples-4.1.0.jar
hadoop fs -mkdir -p /user/root/examples/apps/map-reduce
hadoop fs -put ./job.properties /user/root/examples/apps/map-reduce
hadoop fs -put ./workflow.xml /user/root/examples/apps/map-reduce
hadoop fs -put ./lib/oozie-examples-4.1.0.jar /user/root/examples/apps/map-reduce
job.properties ==> 不僅僅需要在HDFS,本地也需要一份。執(zhí)行命令-config是指向本地的文件
oozie job -oozie ${OOZIE_URL} -config job.properties-run
oozie job -oozie ${OOZIE_URL} -info ${oozie_id}
#oozie job -oozie ${OOZIE_URL} -info 0000001-170206083712434-oozie-oozi-W
oozie job -oozie ${OOZIE_URL} -log ${oozie_id}
#oozie job -oozie ${OOZIE_URL} -log 0000001-170206083712434-oozie-oozi-W
五、distcp
job.properties
nameNode=hdfs://${sourceNameNode}:8020 destNameNode=hdfs://${destNameNode}:8020 jobTracker=${RM}:8032 #yarn.resourcemanager.address=${RM}:8032 queueName=default examplesRoot=examples oozie.use.system.libpath=true oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/distcp_2 outputDir=distcp
workflow.xml
${jobTracker} ${nameNode} mapred.job.queue.name ${queueName} ${nameNode}/user/${wf:user()}/${examplesRoot}/input-data/text/data.txt ${destNameNode}/tmp/data.txt DistCP failed, error message[${wf:errorMessage(wf:lastErrorNode())}]
到此,關于“Oozie-4.1.0和hadoop-2.7.1怎么進行編譯”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續(xù)學習更多相關知識,請繼續(xù)關注創(chuàng)新互聯(lián)網站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>
名稱欄目:Oozie-4.1.0和hadoop-2.7.1怎么進行編譯
標題URL:http://weahome.cn/article/ijgeoi.html