You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zuotingbing <gi...@git.apache.org> on 2017/01/03 00:50:24 UTC

[GitHub] spark pull request #16439: [SPARK-19026]SPARK_LOCAL_DIRS(multiple directorie...

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

    https://github.com/apache/spark/pull/16439#discussion_r94352890
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala ---
    @@ -445,12 +445,24 @@ private[deploy] class Worker(
               // Create local dirs for the executor. These are passed to the executor via the
               // SPARK_EXECUTOR_DIRS environment variable, and deleted by the Worker when the
               // application finishes.
    -          val appLocalDirs = appDirectories.getOrElse(appId,
    -            Utils.getOrCreateLocalRootDirs(conf).map { dir =>
    -              val appDir = Utils.createDirectory(dir, namePrefix = "executor")
    -              Utils.chmod700(appDir)
    -              appDir.getAbsolutePath()
    -            }.toSeq)
    +          val appLocalDirs = appDirectories.getOrElse(appId, {
    +            val dirs = Utils.getOrCreateLocalRootDirs(conf).flatMap { dir =>
    +              try {
    +                val appDir = Utils.createDirectory(dir, namePrefix = "executor")
    +                Utils.chmod700(appDir)
    +                Some(appDir.getAbsolutePath())
    +              } catch {
    +                case e: IOException =>
    +                  logError(s"${e.getMessage}. Ignoring this directory.")
    --- End diff --
    
    Hi owen, thanks for your review, i will merge it.


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