hadoop伪分布式运行案例(三)——其他相关配置

一、历史服务器配置

1.配置mapred-site.xml


mapreduce.jobhistory.address
hadoop101:10020


    mapreduce.jobhistory.webapp.address
    hadoop101:19888

2.查看启动历史服务器文件目录:

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

3.启动历史服务器

sbin/mr-jobhistory-daemon.sh start historyserver

4.查看历史服务器是否启动

jps

5.查看jobhistory

http://192.168.1.101:19888/jobhistory

二、日志聚集配置

1.配置yarn-site.xml



yarn.log-aggregation-enable
true



yarn.log-aggregation.retain-seconds
604800

2.关闭nodemanager 、resourcemanager和historymanager

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

3.启动nodemanager 、resourcemanager和historymanager

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

4.删除hdfs上已经存在的hdfs文件

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

5.执行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

你可能感兴趣的:(hadoop伪分布式运行案例(三)——其他相关配置)