dongjoon-hyun commented on a change in pull request #28255: [SPARK-31484][Core] 
Add stage attempt number to temp checkpoint filename to avoid file already 
existing exception
URL: https://github.com/apache/spark/pull/28255#discussion_r410765392
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/rdd/ReliableCheckpointRDD.scala
 ##########
 @@ -218,11 +218,16 @@ private[spark] object ReliableCheckpointRDD extends 
Logging {
     }
     val serializer = env.serializer.newInstance()
     val serializeStream = serializer.serializeStream(fileOutputStream)
-    Utils.tryWithSafeFinally {
+    Utils.tryWithSafeFinallyAndFailureCallbacks {
       serializeStream.writeAll(iterator)
-    } {
+    } (catchBlock = {
+      val deleted = fs.delete(tempOutputPath, false)
+      if (!deleted) {
+        logInfo(s"Failed to delete tempOutputPath $tempOutputPath.")
 
 Review comment:
   Just a question. This is `Info` because the job is not failed?

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