Hadoop启用日志记录 [英] Hadoop enable logging

查看:139
本文介绍了Hadoop启用日志记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试在单个集群模式下使用从源代码构建的hadoop。我检查了0.22.0-alpha-1。我正在面对日志记录方面的一些问题。
如何启用调试日志。



我尝试添加

  log4j.logger.org.apache.hadoop.mapred.JobTracker = DEBUG 
log4j.logger.org.apache.hadoop.mapred.TaskTracker = DEBUG

在log4j.properties中。



但它似乎不起作用。有人能帮我并启用调试日志。此外,我想知道是否有任何其他日志我可以启用除了Jobtracker和tasktracker和相应的行添加到log4j.properties文件。



<我也尝试在代码中添加几条LOG.info()语句,并编译它们并在它们上面运行hadoop作业。但是我无法像控制台上出现的其他日志那样在控制台上打印出这些日志语句。请让我知道我是否缺少一些东西。



谢谢 解决方案

我建议尝试

  log4j.logger.org.apache.hadoop = DEBUG 



如果这不起作用,那么你还没有正确配置log4j。


I am trying to work with hadoop built from source in a single cluster mode.I checked out 0.22.0-alpha-1.I am facing few problems with logging. How do i enable debug logs.

I tried adding

log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG
log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG 

in log4j.properties.

But it doesn't seem to work.Can some one help me with enabling debug logs.Also i would like to know if there are any other logs i can enable apart from Jobtracker and tasktracker and the corresponding lines to add in log4j.properties file.

Also i tried adding few LOG.info() statements in the code and compiled them and ran hadoop jobs over them. But i am not able to get these log statements printed out at the console like some other logs that appear on the console. Please let me know if i am missing something.

Thanks

解决方案

I'd suggest trying

log4j.logger.org.apache.hadoop = DEBUG

for debug logging inside of every Hadoop class.

If this doesn't work, then you haven't configured log4j properly.

这篇关于Hadoop启用日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆