创建公司网站 教程,广州建设局,品牌高端网站制作企业,菜鸟建站网1. 配置了三台服务器#xff0c;hadoop22, hadoop23, hadoop24
2. hadoop文件路径: /opt/module/hadoop-3.3.4
3. hadoop22机器配置历史服务器的配置文件#xff1a; 文件路径#xff1a;/opt/module/hadoop-3.3.4/etc/hadoop 文件名称#xff1a;mapred-size.xml 新增历…1. 配置了三台服务器hadoop22, hadoop23, hadoop24
2. hadoop文件路径: /opt/module/hadoop-3.3.4
3. hadoop22机器配置历史服务器的配置文件 文件路径/opt/module/hadoop-3.3.4/etc/hadoop 文件名称mapred-size.xml 新增历史服务器配置并修改为自己的地址
?xml version1.0?
?xml-stylesheet typetext/xsl hrefconfiguration.xsl?
!--Licensed under the Apache License, Version 2.0 (the License);you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an AS IS BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License. See accompanying LICENSE file.
--!-- Put site-specific property overrides in this file. --configuration!-- 指定MapReduce程序运行在Yarn上 --propertynamemapreduce.framework.name/namevalueyarn/value/property!-- 历史服务器端地址 --propertynamemapreduce.jobhistory.address/namevaluehadoop22:10020/value/property!-- 历史服务器web端地址 --propertynamemapreduce.jobhistory.webapp.address/namevaluehadoop22:19888/value/property/configuration4. 将此文件分发到其他机器或者手动复制过去也行每台机器的这个文件都需要改下
# 这个命令是我相关文章的一个脚本如果没有这个脚本是运行不了的
# 可以查看之前文章添加脚本也可以手动复制修改 也可以centos 的scp 命令发送过去
# 先看注释
# 先看注释
# 先看注释xsync mapred-size.xml
5. 重新启动yarn, hdfs集群
6. 启动历史服务命令
# hadoop文件夹
cd /opt/module/hadoop-3.3.4# 运行
bin/mapred --daemon start historyserver# jps 查看
jps 7. 测试 运行命令
#
hadoop fs -mkdir /inputhadoop fs -put wcinput/word.txt /input# 统计
hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.3.4.jar wordcount /input /output8. 查看控制台
http://192.168.164.23:8088/cluster 点击history 即可查看 9. 停止历史服务器
# hadoop文件夹
cd /opt/module/hadoop-3.3.4# 停止
bin/mapred --daemon stop historyserver