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 13:46:18 -0800 |
commit | b978c9fee3c376db46612f54b17ff2a2aac47937 (patch) | |
tree | 2920955d46da7c5898283557b4bc0253b850da1e /core/src/main/scala | |
parent | 00746a5c987f74e70fe6daf06054a0c58e2ae28c (diff) | |
download | spark-b978c9fee3c376db46612f54b17ff2a2aac47937.tar.gz spark-b978c9fee3c376db46612f54b17ff2a2aac47937.tar.bz2 spark-b978c9fee3c376db46612f54b17ff2a2aac47937.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
Diffstat (limited to 'core/src/main/scala')
-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 8d230fff76..695084f2e1 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 } |