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

    https://github.com/apache/spark/pull/299#discussion_r11719747
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkConf.scala ---
    @@ -208,6 +208,81 @@ class SparkConf(loadDefaults: Boolean) extends 
Cloneable with Logging {
         new SparkConf(false).setAll(settings)
       }
     
    +  /** Checks for illegal or deprecated config settings. Throws an 
exception for the former. Not
    +    * idempotent - may mutate this conf object to convert deprecated 
settings to supported ones. */
    +  private[spark] def validateSettings() {
    +    if (settings.contains("spark.local.dir")) {
    +      val msg = "In Spark 1.0 and later spark.local.dir will be overridden 
by the value set by " +
    +        "the cluster manager (via SPARK_LOCAL_DIRS in mesos/standalone and 
LOCAL_DIRS in YARN)."
    +      logWarning(msg)
    +    }
    +
    +    val executorOptsKey = "spark.executor.extraJavaOptions"
    +    val executorClasspathKey = "spark.executor.extraClassPath"
    +    val driverOptsKey = "spark.driver.extraJavaOptions"
    +    val driverClassPathKey = "spark.driver.extraClassPath"
    +
    +    // Validate spark.executor.extraJavaOptions
    +    settings.get(executorOptsKey).map { javaOpts =>
    +      if (javaOpts.contains("-Dspark")) {
    +        val msg = s"$executorOptsKey is not allowed to set Spark options. 
Was '$javaOpts'"
    --- End diff --
    
    Maybe also add how the user is supposed to set `-Dspark*` options. Small 
nit: `Was '$javaOpts'` is inconsistent with what it is below (i.e. `was 
'$javaOpts'`)


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

Reply via email to