How to drop messages in console when using spark-submit? [duplicate]

二次信任 提交于 2020-01-17 13:47:05

问题


When I run spark-submit job with scala, I can see a lot of status messages in console.

But I would like to see only my prints. Can I put any parameter in order not to see these messages?


回答1:


This should do the trick for the most part. Put it inside the code:

import org.apache.log4j.{Level, Logger}
Logger.getLogger("org").setLevel(Level.WARN)
Logger.getLogger("akka").setLevel(Level.WARN)

Or this in conf/log4j.properties:

log4j.rootCategory=WARN, console


来源:https://stackoverflow.com/questions/38637662/how-to-drop-messages-in-console-when-using-spark-submit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!