xuanyuanking commented on a change in pull request #24892: [SPARK-25341][Core] 
Support rolling back a shuffle map stage and re-generate the shuffle files
URL: https://github.com/apache/spark/pull/24892#discussion_r297072020
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/storage/DiskBlockManager.scala
 ##########
 @@ -77,7 +77,14 @@ private[spark] class DiskBlockManager(conf: SparkConf, 
deleteFilesOnStop: Boolea
     new File(subDir, filename)
   }
 
-  def getFile(blockId: BlockId): File = getFile(blockId.name)
+  def getFile(blockId: BlockId, shuffleGenerationId: Int = -1): File = {
+    val generationId = if (shuffleGenerationId != -1) {
+      "_" + shuffleGenerationId
+    } else {
+      ""
+    }
+    getFile(blockId.name.replace(".", generationId + "."))
 
 Review comment:
   Copy that and thanks for the advice, I do this at the caller side and revert 
the changes in DiskBlockManager in 2362512.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to