You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also add documentation about logging to the Yarn guide.
In cluster mode, the change modifies some code added in fb98488
to treat both client and cluster modes as mostly the same. Previously,
cluster mode was only forwarding system properties that started
with "spark", which caused it to ignore anything that SparkSubmit
sets directly in the SparkConf object.
Copy file name to clipboardExpand all lines: docs/running-on-yarn.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,7 +165,20 @@ all environment variables used for launching each container. This process is use
165
165
classpath problems in particular. (Note that enabling this requires admin privileges on cluster
166
166
settings and a restart of all node managers. Thus, this is not applicable to hosted clusters).
167
167
168
-
# Important Notes
168
+
To use a custom log4j configuration for the application master or executors, there are two options:
169
+
170
+
- upload a custom log4j.properties using spark-submit, by adding it to the "--files" list of files
171
+
to be uploaded with the application.
172
+
- add "-Dlog4j.configuration=<locationofconfigurationfile>" to "spark.driver.extraJavaOptions"
173
+
(for the driver) or "spark.executor.extraJavaOptions" (for executors). Note that if using a file,
174
+
the "file:" protocol should be explicitly provided, and the file needs to exist locally on all
175
+
the nodes.
176
+
177
+
Note that for the first option, both executors and the application master will share the same
178
+
log4j configuration, which may cause issues when they run on the same node (e.g. trying to write
179
+
to the same log file).
180
+
181
+
# Important notes
169
182
170
183
- Before Hadoop 2.2, YARN does not support cores in container resource requests. Thus, when running against an earlier version, the numbers of cores given via command line arguments cannot be passed to YARN. Whether core requests are honored in scheduling decisions depends on which scheduler is in use and how it is configured.
171
184
- The local directories used by Spark executors will be the local directories configured for YARN (Hadoop YARN config `yarn.nodemanager.local-dirs`). If the user specifies `spark.local.dir`, it will be ignored.
0 commit comments