I think you can change the log level as
sparkContext.setLogLevel("WARN")
You can choose the log level among
ALL, DEBUG, ERROR, FATAL, INFO, OFF, TRACE, WARN
If the log is printed in a spark shell, you can change the log level from the configuration file located in conf/log4j.properties(change name from conf/log4j.properties.template) then change the log level as you want
log4j.rootCategory=INFO, console
and open the shell again, you will see less output.
source
share