如何在控制台上抑制 Hadoop 日志记录消息
这些是我试图压制的 Hadoop 日志消息
11/10/17 19:42:23 INFO mapred.MapTask: (EQUATOR) 0 kvi 26214396(104857584)
11/10/17 19:42:23 INFO mapred.MapTask: mapreduce.task.io.sort.mb: 100
11/10/17 19:42:23 INFO mapred.MapTask: soft limit at 83886080
11/10/17 19:42:23 INFO mapred.MapTask: bufstart = 0; bufvoid = 104857600
11/10/17 19:42:23 INFO mapred.MapTask: kvstart = 26214396; length = 6553600
,我想它们是由 conf 目录下的 logg 4j.properties 配置的 在hadoop安装目录下。不管我如何删除记录器,评论 删除记录器,甚至重命名 log4j.properties。它们仍在印刷中。 请指教。
另外,我怀疑如果消息量很大,这些大量消息会影响整体性能。 谢谢,
These are the Hadoop Logging Message I was trying to surpress
11/10/17 19:42:23 INFO mapred.MapTask: (EQUATOR) 0 kvi 26214396(104857584)
11/10/17 19:42:23 INFO mapred.MapTask: mapreduce.task.io.sort.mb: 100
11/10/17 19:42:23 INFO mapred.MapTask: soft limit at 83886080
11/10/17 19:42:23 INFO mapred.MapTask: bufstart = 0; bufvoid = 104857600
11/10/17 19:42:23 INFO mapred.MapTask: kvstart = 26214396; length = 6553600
I suppose they are configured by logg 4j.properties under the conf directory
under the hadoop installation directory. No matter how I remove the logger, comment
out the logger, and even rename the log4j.properties. They are still being printed.
Please advise.
Also I suspect these massive messages will impact the overall performance if the volume is big.
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须将日志级别提高到 WARN,我假设它当前处于 INFO 状态。也许您必须重新编译,因为这些属性也包含在 jar 中。
You have to increase the log level to WARN, I assume it is currently on INFO. Maybe you have to recompile because the properties are also contained in the jar.
我已经找到了解决方案。它所需要的只是更改mapreduce的配置文件。
mapreduce.map.log.level 的值可以为 OFF、FATAL、ERROR、WARN、
信息、调试、跟踪等等。该设置可以被覆盖,如果
“mapreduce.job.log4j-properties-file”已设置。
mapreduce.reduce.log.level也可以取值OFF、FATAL、
错误、警告、信息、调试、跟踪和所有。设置可以是
如果设置了“mapreduce.job.log4j-properties-file”,则覆盖。所以它
更好地确保“mapreduce.job.log4j-properties-file”是
未设置。
我们必须在 mapred-site.xml 中设置以下属性。
现在我在控制台上看不到任何日志消息。但它也有缺点,因为如果在执行 MapReduce 代码时发生错误,我们无法找出任何错误,因为没有可见的日志消息。
I have found solution for this.All that it needs is changing the configuration file of mapreduce.
mapreduce.map.log.level can take values as OFF, FATAL, ERROR, WARN,
INFO, DEBUG, TRACE and ALL. The setting could be overridden if
"mapreduce.job.log4j-properties-file" is set.
mapreduce.reduce.log.level can also take values as OFF, FATAL,
ERROR, WARN, INFO, DEBUG, TRACE and ALL. The setting could be
overridden if "mapreduce.job.log4j-properties-file" is set.So its
better to make sure that "mapreduce.job.log4j-properties-file" is
not set.
We have to set following properties in the mapred-site.xml.
Now i can see no log messages on the console.But it also has disadvantage as we cant figure out any error if it occurs while executing the mapreduce code as no log messages are visible.