Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3409#discussion_r21707289
  
    --- Diff: yarn/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.am.extraJavaOptions"
    +      val amOpts = sparkConf.getOption(amOptsKey)
    +      amOpts.foreach { opts =>
    +        if (opts.contains("-Dspark")) {
    +          val msg = s"$amOptsKey is not allowed to set Spark options (was 
'$opts'). "
    +          throw new SparkException(msg)
    +        }
    +        if (opts.contains("-Xmx") || opts.contains("-Xms")) {
    +          val msg = s"$amOptsKey is not allowed to alter memory settings 
(was '$opts')."
    +          throw new SparkException(msg)
    +        }
    +        javaOpts += opts
    --- End diff --
    
    what was the verdict on not using `Utils.splitCommandString` again? Why 
can't we do that here? I think we should because we should keep the format of 
what `spark.*.extraJavaOptions` accepts consistent


---
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]

Reply via email to