dtarima commented on a change in pull request #33251:
URL: https://github.com/apache/spark/pull/33251#discussion_r667198192
##########
File path: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
##########
@@ -2010,10 +2012,12 @@ private[spark] object BlockManager {
val filePath = file.path()
+ val deleter: DownloadFileDeleter = file.deleter()
+
def cleanUp(): Unit = {
logDebug(s"Clean up file $filePath")
- if (!file.delete()) {
+ if (!deleter.delete()) {
Review comment:
Is that OK if I remove `DownloadFile::delete` method? It seems a bit
weird to have the path exposed in the interface which is used for deletion and
logging, and redundantly have another method to just delete the file.
--
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]