spark-submit, how to specify log4j.properties

前端 未结 6 1939
旧巷少年郎
旧巷少年郎 2021-02-02 00:04

In spark-submit, how to specify log4j.properties ?

Here is my script. I have tried all of combinations and even just use one local node. but looks like the log4j.propert

6条回答
  •  不知归路
    2021-02-02 00:13

    Just to add, you can directly pass the conf via spark-submit, no need to modify defaults conf file

    --conf spark.driver.extraJavaOptions=-Dlog4j.configuration=file:///export/home/siva/log4j.properties

    i ran below command, it worked fine

    /usr/hdp/latest/spark2/bin/spark-submit --master local[*] --files ~/log4j.properties --conf spark.sql.catalogImplementation=hive --conf spark.driver.extraJavaOptions=-Dlog4j.configuration=file:///export/home/siva/log4j.properties ~/SCD/spark-scd-assembly-1.0.jar test_run

    Note: If you have extra java options configured in conf file, just append and submit

提交回复
热议问题