viirya 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_r410775059
##########
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:
I think either logWarning or logInfo should be fine. After adding stage
attempt, even we fail to delete previous temporary output path, we won't see
file already existing exception.
----------------------------------------------------------------
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]