diff options
-rw-r--r-- | docs/running-on-yarn.md | 7 | ||||
-rw-r--r-- | yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/docs/running-on-yarn.md b/docs/running-on-yarn.md index 0968fc5ad6..b6701b64c2 100644 --- a/docs/running-on-yarn.md +++ b/docs/running-on-yarn.md @@ -190,6 +190,13 @@ Most of the configs are the same for Spark on YARN as for other deployment modes </td> </tr> <tr> + <td><code>spark.yarn.am.extraLibraryPath</code></td> + <td>(none)</td> + <td> + Set a special library path to use when launching the application master in client mode. + </td> +</tr> +<tr> <td><code>spark.yarn.maxAppAttempts</code></td> <td>yarn.resourcemanager.am.max-attempts in YARN</td> <td> diff --git a/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala b/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala index b945395f24..31ab6b491e 100644 --- a/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala +++ b/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala @@ -544,6 +544,10 @@ private[spark] class Client( } javaOpts ++= Utils.splitCommandString(opts).map(YarnSparkHadoopUtil.escapeForShell) } + + sparkConf.getOption("spark.yarn.am.extraLibraryPath").foreach { paths => + prefixEnv = Some(Utils.libraryPathEnvPrefix(Seq(paths))) + } } // For log4j configuration to reference |