Github user DoingDone9 commented on the pull request:
https://github.com/apache/spark/pull/9951#issuecomment-159525672
```
shutdownDeletePaths.foreach { dirPath =>
try {
logInfo("Deleting directory " + dirPath)
Utils.deleteRecursively(new File(dirPath))
} catch {
case e: Exception => logError(s"Exception while deleting Spark temp
dir: $dirPath", e)
}
}
```
`Utils.deleteRecursively(new File(dirPath) ` call
`ShutdownHookManager.removeShutdownDeleteDir(file)`
```
def deleteRecursively(file: File) {
...
ShutdownHookManager.removeShutdownDeleteDir(file)
...
}
```
`ShutdownHookManager.removeShutdownDeleteDir(file) `will deleting elements
of shutdownDeletePaths
```
def removeShutdownDeleteDir(file: File) {
val absolutePath = file.getAbsolutePath()
shutdownDeletePaths.synchronized {
shutdownDeletePaths.remove(absolutePath)
}
}
```
@rxin
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]