Hadoop配置日志的聚集——jobhistory不显示任务问题_jobhistory页面看不到任务

sbin/stop-yarn.sh

mapred --daemon stop historyserver

4.启动NodeManager 、ResourceManage和HistoryServer

start-yarn.sh

mapred --daemon start historyserver

到这里都没有错,找了半天发现是前面配置的mapred-site.xml出错了,就是如果设置日志聚集的话,前面配置的mapred-site也需要修改一下配置。
如下:

<?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 上,表示MapReduce使用yarn框架 -->
 <property>
     <name>mapreduce.framework.name</name>
     <value>yarn</value>
 </property>
 <!-- 开启MapReduce小任务模式 -->
 <property>
     <name>mapreduce.job.ubertask.enable</name>
     <value>true</value>
 </property>

<!-- 历史服务器端地址 -->
<property>
    <name>mapreduce.jobhistory.address</name>
    <value>hadoop102:10020</value>
</property>

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

yarn框架没有配置
造成的结果:

在这里插入图片描述修改以后在分发一下,重新启动就好了,运行命令也有记录了

hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar wordcount /input /output

如图:
在这里插入图片描述这样就改好了,出现类似问题的话,大部分就是mapred-site和yarn-site这两个文件没有配置好,就可以多检查几遍看看。

刚刚发现这个错误是源于我上一篇博文的修改错误的结果,但是很奇怪的是改回来再运行wordcount没有卡住了。

img
img

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化资料的朋友,可以戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

  • 5
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值