apache/spark — pull request #2945 by liancheng (2014-10-26 17:40:09+00:00)
Title: [SPARK-4091][Core] Don't delete spark local directories twice

Temporary local directories created by `DiskBlockManager` are asked to be deleted at two places:

1. in `DiskBlockManager.addShutdownHook()`
2. in `DiskBlockManager.stop()`

Both of them are executed as shutdown hooks in parallel, and may cause subtle race conditions that makes the 2nd deletion fail. In most cases, this failure is harmless, but when it happens on Jenkins builds that runs Spark SQL tests, it fails `CliSuite`.