Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import org.apache.spark.internal.config.History.HybridStoreDiskBackend.ROCKSDB
import org.apache.spark.status.KVUtils
import org.apache.spark.status.KVUtils._
import org.apache.spark.util.{Clock, Utils}
import org.apache.spark.util.ShutdownHookManager
import org.apache.spark.util.kvstore.KVStore

/**
Expand Down Expand Up @@ -321,6 +322,7 @@ private class HistoryServerDiskManager(
val newSize = sizeOf(tmpPath)
makeRoom(newSize)
tmpPath.renameTo(dst)
ShutdownHookManager.removeShutdownDeleteDir(tmpPath)

updateUsage(newSize, committed = true)
if (committedUsage.get() > maxUsage) {
Expand All @@ -343,6 +345,7 @@ private class HistoryServerDiskManager(
def rollback(): Unit = {
updateUsage(-leased)
Utils.deleteRecursively(tmpPath)
ShutdownHookManager.removeShutdownDeleteDir(tmpPath)
}

}
Expand Down