Skip to content

Commit a777c65

Browse files
foxiksrowen
authored andcommitted
[SPARK-5970][core] Register directory created in getOrCreateLocalRootDirs for automatic deletion.
As documented in createDirectory, the result of createDirectory is not registered for automatic removal. Currently there are 4 directories left in `/tmp` after just running `pyspark`. Author: Milan Straka <[email protected]> Closes #4759 from foxik/remove-tmp-dirs and squashes the following commits: 280450d [Milan Straka] Use createTempDir in getOrCreateLocalRootDirs...
1 parent 7d8e6a2 commit a777c65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/util/Utils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ private[spark] object Utils extends Logging {
696696
try {
697697
val rootDir = new File(root)
698698
if (rootDir.exists || rootDir.mkdirs()) {
699-
val dir = createDirectory(root)
699+
val dir = createTempDir(root)
700700
chmod700(dir)
701701
Some(dir.getAbsolutePath)
702702
} else {

0 commit comments

Comments
 (0)