You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/02/24 01:11:18 UTC
[GitHub] [spark] akpatnam25 commented on a change in pull request #35085: [SPARK-37618][CORE] Remove shuffle blocks using the shuffle service for released executors
akpatnam25 commented on a change in pull request #35085:
URL: https://github.com/apache/spark/pull/35085#discussion_r813464588
##########
File path: core/src/main/scala/org/apache/spark/util/Utils.scala
##########
@@ -2742,6 +2743,16 @@ private[spark] object Utils extends Logging {
new File(path.getAbsolutePath + "." + UUID.randomUUID())
}
+ /**
+ * Creates a file with group write permission.
+ */
+ def createFileAsGroupWritable(file: File): Unit = {
+ val perms = PosixFilePermissions.fromString("rw-rw----")
+ val path = file.toPath
+ Files.createFile(path)
+ Files.setPosixFilePermissions(path, perms)
Review comment:
I was looking into this in our environment and was able to get the below piece of code working:
` if (dirToCreate.mkdirs() && dirToCreate.exists()) {
Files.setPosixFilePermissions(dirToCreate.toPath,
PosixFilePermissions.fromString("rwxrwx---"))
created = dirToCreate
}`
@Kimahriman do you mind testing this piece of code in your environment? It seems like the code referenced in the TODO does not pass the unit tests and also does not work in our environment.
If this looks good we can clean it up.
cc: @zhouyejoe
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org