hadoop偽分布式運(yùn)行案例(三)——其他相關(guān)配置

一、歷史服務(wù)器配置

1.配置mapred-site.xml

<property>
<name>mapreduce.jobhistory.address</name>
<value>hadoop101:10020</value>
</property>
<property>
    <name>mapreduce.jobhistory.webapp.address</name>
    <value>hadoop101:19888</value>
</property>

2.查看啟動(dòng)歷史服務(wù)器文件目錄:

[root@hadoop101 hadoop-2.7.2]# ls sbin/ |grep mr
mr-jobhistory-daemon.sh

3.啟動(dòng)歷史服務(wù)器

sbin/mr-jobhistory-daemon.sh start historyserver

4.查看歷史服務(wù)器是否啟動(dòng)

jps

5.查看jobhistory

http://192.168.1.101:19888/jobhistory

二、日志聚集配置

1.配置yarn-site.xml

<!-- 日志聚集功能使能 -->
<property>
<name>yarn.log-aggregation-enable</name>
<value>true</value>
</property>
<!-- 日志保留時(shí)間設(shè)置7天 -->
<property>
<name>yarn.log-aggregation.retain-seconds</name>
<value>604800</value>
</property>

2.關(guān)閉nodemanager 、resourcemanager和historymanager

sbin/yarn-daemon.sh stop resourcemanager
sbin/yarn-daemon.sh stop nodemanager
sbin/mr-jobhistory-daemon.sh stop historyserver

3.啟動(dòng)nodemanager 、resourcemanager和historymanager

sbin/yarn-daemon.sh start resourcemanager
sbin/yarn-daemon.sh start nodemanager
sbin/mr-jobhistory-daemon.sh start historyserver

4.刪除hdfs上已經(jīng)存在的hdfs文件

bin/hdfs dfs -rm -R /user/honey/mapreduce/wordcount/output

5.執(zhí)行wordcount程序

hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.2.jar wordcount /user/honey/mapreduce/wordcount/input /user/honey/mapreduce/wordcount/output

6.查看日志

http://192.168.1.101:19888/jobhistory

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容