How to suppress INFO messages for spark-sql running on EMR?

前端 未结 3 1911
抹茶落季
抹茶落季 2021-01-31 21:32

I\'m running Spark on EMR as described in Run Spark and Spark SQL on Amazon Elastic MapReduce:

This tutorial walks you through installing and operating Sp

3条回答
  •  心在旅途
    2021-01-31 22:00

    spark-sql --driver-java-options "-Dlog4j.configuration=file:///home/hadoop/conf/log4j.properties"

    cat conf/log4j.properties

    # Set everything to be logged to the console
    log4j.rootCategory=WARN, console
    log4j.appender.console=org.apache.log4j.ConsoleAppender
    log4j.appender.console.target=System.err
    log4j.appender.console.layout=org.apache.log4j.PatternLayout
    log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n
    
    # Settings to quiet third party logs that are too verbose
    log4j.logger.org.eclipse.jetty=WARN
    log4j.logger.org.eclipse.jetty.util.component.AbstractLifeCycle=ERROR
    log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=WARN
    log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=WARN
    

提交回复
热议问题