Created
June 20, 2018 16:44
-
-
Save bkj/697200d9368f1f2ee3e76a961324eb7a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
quiet-logs.py | |
Supress annoying warning messages in `pyspark` | |
""" | |
def quiet_logs(sc): | |
logger = sc._jvm.org.apache.log4j | |
logger.LogManager.getLogger("org"). setLevel( logger.Level.ERROR ) | |
logger.LogManager.getLogger("akka").setLevel( logger.Level.ERROR ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment