mr的logs的查看

本文介绍了如何在Hadoop环境中通过启动historyserver并配置yarn参数来查看MapReduce任务的日志,包括解决日志不可见的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在map或者reduce函数中使用System.out.println打印的信息沾满查看呢?

步骤1:启动history server

/usr/local/hadoop-2.6.0/sbin/mr-jobhistory-daemon.sh start historyserver

步骤2:使用http://hadoop26:19888/jobhistory来查看作业log

 

意外情况:

如果在查看日志的时候,发生了下面的情况

在yarn-default.xml中有这样的一个配置

<property>
<description>Whether to enable log aggregation. Log aggregation collects
each container's logs and moves these logs onto a file-system, for e.g.
HDFS, after the application completes. Users can configure the
"yarn.nodemanager.remote-app-log-dir" and
"yarn.nodemanager.remote-app-log-dir-suffix" properties to determine
where these logs are moved to. Users can access the logs via the
Application Timeline Server.
</description>
<name>yarn.log-aggregation-enable</name>
<value>false</value>
</property>

 我们需要把这个值改为true,也就是在yarn-site.xml中再配置一遍

配置完成后重启historyserver即可。

现在来看看logs的输出吧:

转载于:https://www.cnblogs.com/dongdone/p/5687626.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值