目的:查看历史进程配置mapred-site.xml,文件在/opt/module/hadoop-2.7.2/etc/hadoop目录下,添加一下内容:
mapreduce.jobhistory.address hadoop102:10020 mapreduce.jobhistory.webapp.address hadoop102:19888
注:一个内部端口一个外部端口;将配置文件分发到hadoop103,hadoop104中
[amelia@hadoop102 hadoop]$ xsync mapred-site.xml
在hadoop102上启动历史服务器
- 在3.x用mapred --daemon start historyserver在2.x用mr-jobhistory-daemon.sh start historyserver来启动历史服务器(我用的是2.x)
查看服务器是否启动
查看JobHistory
[amelia@hadoop102 hadoop-2.7.2]$ hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.2.jar wordcount /input /output
进入网站http://hadoop102:9870/
能看到19888的任务运行的相关情况



