Don't accept generated temp directory names that can't be created successfully.
This commit is contained in:
parent
aa8fe1a209
commit
c847dd3da2
|
@ -168,8 +168,7 @@ private class DiskStore(blockManager: BlockManager, rootDirs: String)
|
||||||
localDirId = "%s-%04x".format(dateFormat.format(new Date), rand.nextInt(65536))
|
localDirId = "%s-%04x".format(dateFormat.format(new Date), rand.nextInt(65536))
|
||||||
localDir = new File(rootDir, "spark-local-" + localDirId)
|
localDir = new File(rootDir, "spark-local-" + localDirId)
|
||||||
if (!localDir.exists) {
|
if (!localDir.exists) {
|
||||||
localDir.mkdirs()
|
foundLocalDir = localDir.mkdirs()
|
||||||
foundLocalDir = true
|
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
case e: Exception =>
|
case e: Exception =>
|
||||||
|
|
Loading…
Reference in a new issue