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/04 22:46:10 UTC

[GitHub] [spark] otterc commented on a change in pull request #35085: [SPARK-37618][CORE] Remove shuffle blocks using the shuffle service for released executors

otterc commented on a change in pull request #35085:
URL: https://github.com/apache/spark/pull/35085#discussion_r799863347



##########
File path: core/src/main/scala/org/apache/spark/storage/DiskBlockManager.scala
##########
@@ -94,7 +95,13 @@ private[spark] class DiskBlockManager(
       } else {
         val newDir = new File(localDirs(dirId), "%02x".format(subDirId))
         if (!newDir.exists()) {
-          Files.createDirectory(newDir.toPath)
+          // SPARK-37618: Create dir as group writable so files within can be deleted by the
+          // shuffle service
+          val path = newDir.toPath
+          Files.createDirectory(path)
+          val currentPerms = Files.getPosixFilePermissions(path)
+          currentPerms.add(PosixFilePermission.GROUP_WRITE)

Review comment:
       @tgravescs Does Tez not rely on Yarn to remove the application local dirs once the application finishes? If the TEZ DAG corresponds to a Yarn application and if the shuffle data is written under the app local dirs, then probably it is just leveraging Yarn to remove the entire app local dirs. NodeManager deletes the app local dirs as the user using [this code](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#L2767), I think. Even for Spark, this data gets deleted when the Spark application finishes but in this change we are trying to remove the data earlier by the Spark shuffle service. 




-- 
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