问题
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