Repository: spark
Updated Branches:
  refs/heads/branch-2.3 cbb228e48 -> 2381d60a2


[SPARK-25509][CORE] Windows doesn't support POSIX permissions

SHS V2 cannot enabled in Windows, because windows doesn't support POSIX 
permission.

test case fails in windows without this fix.
org.apache.spark.deploy.history.HistoryServerDiskManagerSuite  test("leasing 
space")

SHS V2  cannot run successfully in Windows without this fix.

java.lang.UnsupportedOperationException: 'posix:permissions' not supported as 
initial attribute
  at 
sun.nio.fs.WindowsSecurityDescriptor.fromAttribute(WindowsSecurityDescriptor.java:358)

Closes #22520 from jianjianjiao/FixWindowsPermssionsIssue.

Authored-by: Rong Tang <rot...@microsoft.com>
Signed-off-by: Sean Owen <sean.o...@databricks.com>
(cherry picked from commit a2ac5a72ccd2b14c8492d4a6da9e8b30f0f3c9b4)
Signed-off-by: Sean Owen <sean.o...@databricks.com>


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

Branch: refs/heads/branch-2.3
Commit: 2381d60a279002e58f6c74d3d39f31b344ceff46
Parents: cbb228e
Author: Rong Tang <rot...@microsoft.com>
Authored: Wed Sep 26 10:37:17 2018 -0500
Committer: Sean Owen <sean.o...@databricks.com>
Committed: Wed Sep 26 10:39:15 2018 -0500

----------------------------------------------------------------------
 .../spark/deploy/history/HistoryServerDiskManager.scala       | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/2381d60a/core/src/main/scala/org/apache/spark/deploy/history/HistoryServerDiskManager.scala
----------------------------------------------------------------------
diff --git 
a/core/src/main/scala/org/apache/spark/deploy/history/HistoryServerDiskManager.scala
 
b/core/src/main/scala/org/apache/spark/deploy/history/HistoryServerDiskManager.scala
index c03a360..ad0dd23 100644
--- 
a/core/src/main/scala/org/apache/spark/deploy/history/HistoryServerDiskManager.scala
+++ 
b/core/src/main/scala/org/apache/spark/deploy/history/HistoryServerDiskManager.scala
@@ -18,8 +18,6 @@
 package org.apache.spark.deploy.history
 
 import java.io.File
-import java.nio.file.Files
-import java.nio.file.attribute.PosixFilePermissions
 import java.util.concurrent.atomic.AtomicLong
 
 import scala.collection.JavaConverters._
@@ -107,9 +105,8 @@ private class HistoryServerDiskManager(
     val needed = approximateSize(eventLogSize, isCompressed)
     makeRoom(needed)
 
-    val perms = PosixFilePermissions.fromString("rwx------")
-    val tmp = Files.createTempDirectory(tmpStoreDir.toPath(), "appstore",
-      PosixFilePermissions.asFileAttribute(perms)).toFile()
+    val tmp = Utils.createTempDir(tmpStoreDir.getPath(), "appstore")
+    Utils.chmod700(tmp)
 
     updateUsage(needed)
     val current = currentUsage.get()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to