otterc commented on a change in pull request #35085:
URL: https://github.com/apache/spark/pull/35085#discussion_r788396539
##########
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:
We needed this for push-based shuffle to create merge directory for
push-based shuffle. For push based shuffle, the shuffle service creates merged
shuffle files under merge directory. These files can be read both by the
shuffle server as well as the executor.
Yarn creates user dirs with the setgid bit
[here](https://github.com/apache/hadoop/blob/7c97c0f969e6e04513e0b5920855e3b7095e8d2b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/container-executor.c#L1080).
Also, the container executor sets the umask to 0027 when launching the
container [here](
https://github.com/apache/hadoop/blob/7c97c0f969e6e04513e0b5920855e3b7095e8d2b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/container-executor.c#L2435).
So from the executor, just executing `mkdir <path>` should be sufficient.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]