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
log4j.properties
fileAs I see from your script you want to:
log4j.properties
to executorsNote two things about --files
settings:
Fixing your snippet is very easy now:
current_dir=/tmp
log4j_setting="-Dlog4j.configuration=file:log4j.properties"
spark-submit \
...
--conf "spark.driver.extraJavaOptions=${log4j_setting}" \
--conf "spark.executor.extraJavaOptions=${log4j_setting}" \
--class "my.AppMain" \
--files ${current_dir}/log4j.properties \
...
$current_dir/my-app-SNAPSHOT-assembly.jar
If you would like to read about other ways of configuring logging while using spark-submit
, please visit my other detailed answer: https://stackoverflow.com/a/55596389/1549135