I working in a cluster where I do not have the permission to change the file log4j.properties to stop the info logging while using pyspark (as explained in first answer here.) The following solution as explained in the above question's first answer work for spark-shell (scala)
import org.apache.log4j.Logger
import org.apache.log4j.Level
But for spark with python (ie pyspark), it didn't work nor the following
Logger.getLogger("org").setLevel(Level.OFF)
Logger.getLogger("akka").setLevel(Level.OFF)
How can I stop the verbose printing of info in pyspark WITHOUT changing log4j.properties file?