Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/3409#discussion_r21478911
--- Diff:
yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala ---
@@ -358,6 +358,21 @@ private[spark] trait ClientBase extends Logging {
if (libraryPaths.nonEmpty) {
prefixEnv = Some(Utils.libraryPathEnvPrefix(libraryPaths))
}
+ } else {
+ // Validate and include yarn am specific java options in yarn-client
mode.
+ val amOptsKey = "spark.yarn.clientmode.am.extraJavaOptions"
+ val amOpts = sparkConf.getOption(amOptsKey)
+ amOpts.map { javaOpts =>
--- End diff --
I'd just simplify this as:
sparkConf.getOption(amOptsKey).foreach { opts =>
// validate
// javaOpts += opts
}
Hint: `map()` is more expensive than `foreach()` in general (because it
returns something, unlike foreach).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]