Call correct stop().

Oopsie in #504.

Author: Aaron Davidson <aaron@databricks.com>

Closes #527 from aarondav/stop and squashes the following commits:

8d1446a [Aaron Davidson] Call correct stop().
This commit is contained in:
Aaron Davidson 2014-04-24 23:22:03 -07:00 committed by Patrick Wendell
parent e03bc379ee
commit 45ad7f0ca7

View file

@ -150,11 +150,12 @@ private[spark] class DiskBlockManager(shuffleManager: ShuffleBlockManager, rootD
Runtime.getRuntime.addShutdownHook(new Thread("delete Spark local dirs") {
override def run() {
logDebug("Shutdown hook called")
stop()
DiskBlockManager.this.stop()
}
})
}
/** Cleanup local dirs and stop shuffle sender. */
private[spark] def stop() {
localDirs.foreach { localDir =>
if (localDir.isDirectory() && localDir.exists()) {