一、说在前面
今天完成了完全分布式布局的搭建,并写了用来看分布式运行状况的脚本。
二、配置
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
=====================历史服务器在 mapred-site.xml设置===================== <!-- 历史服务器端地址 --> <property> <name>mapreduce.jobhistory.address</name>q <value>hadoop102:10020</value> </property> <!-- 历史服务器web端地址 --> <property> <name>mapreduce.jobhistory.webapp.address</name> <value>hadoop102:19888</value> </property> 然后分发
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
=====================开启日志聚集 yarn-site.xml设置============== <!-- 开启日志聚集功能 --> <property> <name>yarn.log-aggregation-enable</name> <value>true</value> </property> <!-- 查看日志的路径 --> <property> <name>yarn.log.server.url</name> <value>http://hadoop102:19888/jophistory/logs</value> </property> <!-- 日志存储的时间 --> <property> <name>yarn.log-aggregation.retain-seconds</name> <value>604800</value> </property>
三、脚本
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
=====================myjps.sh======================================== #!/bin/bash for i in hadoop102 hadoop103 hadoop104 do echo "====================== $i JPS ======================" ssh $i /opt/module/jdk1.8.0_212/bin/jps done