diff options
author | Martin Weindel <martin.weindel@gmail.com> | 2015-02-02 13:46:18 -0800 |
---|---|---|
committer | Josh Rosen <joshrosen@databricks.com> | 2015-02-02 14:01:32 -0800 |
commit | bff65b5cca7ae0c6c49e6a04638d18104be4be7c (patch) | |
tree | 3499d6317963852cab6450141d41b7827c1668db | |
parent | 52f5754f45370f98e577a2aa96accf3ee2e2c8e2 (diff) | |
download | spark-bff65b5cca7ae0c6c49e6a04638d18104be4be7c.tar.gz spark-bff65b5cca7ae0c6c49e6a04638d18104be4be7c.tar.bz2 spark-bff65b5cca7ae0c6c49e6a04638d18104be4be7c.zip |
Disabling Utils.chmod700 for Windows
This patch makes Spark 1.2.1rc2 work again on Windows.
Without it you get following log output on creating a Spark context:
INFO org.apache.spark.SparkEnv:59 - Registering BlockManagerMaster
ERROR org.apache.spark.util.Utils:75 - Failed to create local root dir in .... Ignoring this directory.
ERROR org.apache.spark.storage.DiskBlockManager:75 - Failed to create any local dir.
Author: Martin Weindel <martin.weindel@gmail.com>
Author: mweindel <m.weindel@usu-software.de>
Closes #4299 from MartinWeindel/branch-1.2 and squashes the following commits:
535cb7f [Martin Weindel] fixed last commit
f17072e [Martin Weindel] moved condition to caller to avoid confusion on chmod700() return value
4de5e91 [Martin Weindel] reverted to unix line ends
fe2740b [mweindel] moved comment
ac4749c [mweindel] fixed chmod700 for Windows
-rw-r--r-- | core/src/main/scala/org/apache/spark/util/Utils.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala index e0236d23c4..703b23add8 100644 --- a/core/src/main/scala/org/apache/spark/util/Utils.scala +++ b/core/src/main/scala/org/apache/spark/util/Utils.scala @@ -282,7 +282,9 @@ private[spark] object Utils extends Logging { if (dir.exists() || !dir.mkdirs()) { dir = null } else { - if (!chmod700(dir)) { + // Restrict file permissions via chmod if available. + // For Windows this step is ignored. + if (!isWindows && !chmod700(dir)) { dir.delete() dir = null } |