14f8c34040
Assign value of yarn container log directory to java opts "spark.yarn.app.container.log.dir", So user defined log4j.properties can reference this value and write log to YARN container's log directory. Otherwise, user defined file appender will only write to container's CWD, and log files in CWD will not be displayed on YARN UI,and either cannot be aggregated to HDFS log directory after job finished. User defined log4j.properties reference example: log4j.appender.rolling_file.File = ${spark.yarn.app.container.log.dir}/spark.log Author: peng.zhang <peng.zhang@xiaomi.com> Closes #1573 from renozhang/yarn-log-dir and squashes the following commits: 16c5cb8 [peng.zhang] Update doc f2b5e2a [peng.zhang] Change variable's name, and update running-on-yarn.md 503ea2d [peng.zhang] Support log4j log to yarn container dir |
||
---|---|---|
.. | ||
alpha | ||
common/src | ||
stable | ||
pom.xml | ||
README.md |
YARN DIRECTORY LAYOUT
Hadoop Yarn related codes are organized in separate directories to minimize duplicated code.
-
common : Common codes that do not depending on specific version of Hadoop.
-
alpha / stable : Codes that involve specific version of Hadoop YARN API.
alpha represents 0.23 and 2.0.x stable represents 2.2 and later, until the API changes again.
alpha / stable will build together with common dir into a single jar