当前位置: 首页 > news >正文

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

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

<?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 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上 --><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>

4. 将此文件分发到其他机器:(或者手动复制过去也行,每台机器的这个文件都需要改下)

# 这个命令是我相关文章的一个脚本,如果没有这个脚本,是运行不了的,
# 可以查看之前文章,添加脚本,也可以手动复制,修改, 也可以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 /output

 8. 查看控制台:

http://192.168.164.23:8088/cluster

 点击history 即可查看:

 9. 停止历史服务器:

# hadoop文件夹
cd /opt/module/hadoop-3.3.4# 停止:
bin/mapred --daemon stop historyserver

http://www.lryc.cn/news/239322.html

相关文章:

  • Java注解(Annotation)的基本知识
  • ssh远程连接不了虚拟机ubuntu
  • 文心一言 VS 讯飞星火 VS chatgpt (140)-- 算法导论11.4 5题
  • 代码随想录Day51 完结篇 LeetCode T84 柱状图的最大矩形
  • 对接苹果支付退款退单接口
  • 合肥中科深谷嵌入式项目实战——基于ARM语音识别的智能家居系统(三)
  • Web前端—移动Web第四天(vw适配方案、vw和vh的基本使用、综合案例-酷我音乐)
  • 报错注入 [极客大挑战 2019]HardSQL1
  • 【MATLAB源码-第83期】基于matlab的MIMO中V-BALST结构ZF和MMSE检测算法性能误码率对比。
  • Android13 新增 Stable AIDL接口
  • Postman API Enterprise 10.18.1 Crack
  • 电脑内存升级
  • ExcelBDD PHP Guideline
  • C++静态链接库的生成以及使用
  • 【2024系统架构设计】 系统架构设计师第二版-未来信息综合技术
  • JavaFX修改软件图标
  • Linux ps -ef|grep去除 grep --color=auto信息
  • jQuery的学习(一篇文章齐全)
  • 注塑行业各类业务流程图(系统化)
  • Android Studio 安装及使用
  • 计算机网络的OSI七层模型
  • 如何一次性解压多个文件
  • 类和对象学习笔记
  • Linux程序之可变参数选项那些事!
  • 【1day】泛微e-office OA系统user_page接口未授权访问漏洞学习
  • Midjourney绘画提示词Prompt参考教程
  • Altium Designer学习笔记6
  • 【问题解决】Maven密码加密
  • vue3基于vite打包
  • 前端使用JWT时无法获取Authorization请求头