Skip to content

Commit 7ad1c80

Browse files
franklieesrowen
authored andcommitted
[SPARK-42880][DOCS] Update running-on-yarn.md to log4j2 syntax
### What changes were proposed in this pull request? Update log4j1 syntax to log4j2, and use ${sys:spark.yarn.app.container.log.dir} to relocate log path. see https://issues.apache.org/jira/browse/SPARK-42880 ### Why are the changes needed? Since Spark3.3 has changed log4j1 to log4j2, some documents should also be updated. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Just doc. Closes #40504 from frankliee/log4j2. Authored-by: frankzfli <[email protected]> Signed-off-by: Sean Owen <[email protected]>
1 parent 5825db8 commit 7ad1c80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/running-on-yarn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Note that for the first option, both executors and the application master will s
137137
log4j configuration, which may cause issues when they run on the same node (e.g. trying to write
138138
to the same log file).
139139

140-
If you need a reference to the proper location to put log files in the YARN so that YARN can properly display and aggregate them, use `spark.yarn.app.container.log.dir` in your `log4j.properties`. For example, `log4j.appender.file_appender.File=${spark.yarn.app.container.log.dir}/spark.log`. For streaming applications, configuring `RollingFileAppender` and setting file location to YARN's log directory will avoid disk overflow caused by large log files, and logs can be accessed using YARN's log utility.
140+
If you need a reference to the proper location to put log files in the YARN so that YARN can properly display and aggregate them, use `spark.yarn.app.container.log.dir` in your `log4j2.properties`. For example, `appender.file_appender.fileName=${sys:spark.yarn.app.container.log.dir}/spark.log`. For streaming applications, configuring `RollingFileAppender` and setting file location to YARN's log directory will avoid disk overflow caused by large log files, and logs can be accessed using YARN's log utility.
141141

142142
To use a custom metrics.properties for the application master and executors, update the `$SPARK_CONF_DIR/metrics.properties` file. It will automatically be uploaded with other configurations, so you don't need to specify it manually with `--files`.
143143

0 commit comments

Comments
 (0)