hadoop 配置历史服务器 开启历史服务器查看 hadoop (十)

  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

新增历史服务器配置,并修改为自己的地址

bash 复制代码
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.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 at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed 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 and
  limitations under the License. See accompanying LICENSE file.
-->

<!-- Put site-specific property overrides in this file. -->

<configuration>

	<!-- 指定MapReduce程序运行在Yarn上 -->
    <property>
        <name>mapreduce.framework.name</name>
        <value>yarn</value>
    </property>
	
		<!-- 历史服务器端地址 -->
	<property>
		<name>mapreduce.jobhistory.address</name>
		<value>hadoop22:10020</value>
	</property>

	<!-- 历史服务器web端地址 -->
	<property>
		<name>mapreduce.jobhistory.webapp.address</name>
		<value>hadoop22:19888</value>
	</property>

</configuration>
  1. 将此文件分发到其他机器:(或者手动复制过去也行,每台机器的这个文件都需要改下)
bash 复制代码
# 这个命令是我相关文章的一个脚本,如果没有这个脚本,是运行不了的,
# 可以查看之前文章,添加脚本,也可以手动复制,修改, 也可以centos 的scp 命令发送过去
# 先看注释
# 先看注释
# 先看注释

xsync mapred-size.xml
  1. 重新启动yarn, hdfs集群

  2. 启动历史服务命令:

bash 复制代码
# hadoop文件夹
cd /opt/module/hadoop-3.3.4

# 运行:
bin/mapred --daemon start historyserver

# jps 查看
jps
  1. 测试:

运行命令:

bash 复制代码
# 
hadoop fs -mkdir /input

hadoop fs -put wcinput/word.txt /input

# 统计
hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.3.4.jar wordcount /input /output
  1. 查看控制台:

http://192.168.164.23:8088/cluster

点击history 即可查看:

  1. 停止历史服务器:
bash 复制代码
# hadoop文件夹
cd /opt/module/hadoop-3.3.4

# 停止:
bin/mapred --daemon stop historyserver
相关推荐
智算菩萨3 分钟前
使用免费托管平台搭建并部署静态与动态网页教程
服务器·html5·网页·网页部署
leo_2328 分钟前
小数据”与大数据(之二)
大数据·企业信息化·smp(软件制作平台)·软件开发工具·应用系统·小数据系统
旺仔小拳头..13 分钟前
Servlet概念与创建
数据仓库·hive·hadoop
十月南城13 分钟前
文档化与知识库方法——ADR、Runbook与故障手册的结构与维护节奏
大数据·数据库
AEIC学术交流中心17 分钟前
【快速EI检索 | IEEE出版】第五届电子信息工程、大数据与计算机技术国际学术会议 (EIBDCT 2026)
大数据
SeanDe33 分钟前
【Linux `top` 命令详解(结合截图逐行拆解)】
linux·运维·服务器
桌面运维家1 小时前
Windows/Linux文件访问权限修改指南
linux·运维·服务器
cd_949217211 小时前
告别硬床误区,梦百合以AI科技重塑正确睡眠观
大数据·人工智能·科技
DX_水位流量监测1 小时前
德希科技农村供水工程水质在线监测方案
大数据·运维·网络·水质监测·水质传感器·水质厂家·农村供水水质监测方案