Repository: spark
Updated Branches:
  refs/heads/branch-1.2 00746a5c9 -> b978c9fee


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 <[email protected]>
Author: mweindel <[email protected]>

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


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/b978c9fe
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/b978c9fe
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/b978c9fe

Branch: refs/heads/branch-1.2
Commit: b978c9fee3c376db46612f54b17ff2a2aac47937
Parents: 00746a5
Author: Martin Weindel <[email protected]>
Authored: Mon Feb 2 13:46:18 2015 -0800
Committer: Josh Rosen <[email protected]>
Committed: Mon Feb 2 13:46:18 2015 -0800

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/util/Utils.scala | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/b978c9fe/core/src/main/scala/org/apache/spark/util/Utils.scala
----------------------------------------------------------------------
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 8d230ff..695084f 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
           }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to