You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by JoshRosen <gi...@git.apache.org> on 2014/08/08 04:21:41 UTC

[GitHub] spark pull request: Clean up and simplify Spark configuration

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

    https://github.com/apache/spark/pull/299#discussion_r15975800
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/Executor.scala ---
    @@ -64,9 +64,10 @@ private[spark] class Executor(
       // to what Yarn on this system said was available. This will be used later when SparkEnv
       // created.
       if (java.lang.Boolean.valueOf(
    -      System.getProperty("SPARK_YARN_MODE", System.getenv("SPARK_YARN_MODE"))))
    -  {
    +      System.getProperty("SPARK_YARN_MODE", System.getenv("SPARK_YARN_MODE")))) {
         conf.set("spark.local.dir", getYarnLocalDirs())
    +  } else if (sys.env.contains("SPARK_LOCAL_DIRS")) {
    +    conf.set("spark.local.dir", sys.env("SPARK_LOCAL_DIRS"))
    --- End diff --
    
    @pwendell 
    
    If we're running on local mode, then SparkEnv will have already been created and DiskBlockManager will have already created the local dirs using the previous value of "spark.local.dir".  When we change "spark.local.dir" here, the local Executor will attempt to use local directories that might not exist, causing problems for local jobs that use addFIle().
    
    I discovered this issue when debugging some spark-perf tests in local mode on an EC2 node.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org