diff options
author | Milan Straka <fox@ucw.cz> | 2015-02-25 21:33:34 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2015-02-25 21:33:34 +0000 |
commit | a777c65da9bc636e5cf5426e15a2e76d6b21b744 (patch) | |
tree | a0f28963c8c5dabdb211b60335490cda20af7faa /core | |
parent | 7d8e6a2e44e13a6d6cdcd98a0d0c33b243ef0dc2 (diff) | |
download | spark-a777c65da9bc636e5cf5426e15a2e76d6b21b744.tar.gz spark-a777c65da9bc636e5cf5426e15a2e76d6b21b744.tar.bz2 spark-a777c65da9bc636e5cf5426e15a2e76d6b21b744.zip |
[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 <fox@ucw.cz>
Closes #4759 from foxik/remove-tmp-dirs and squashes the following commits:
280450d [Milan Straka] Use createTempDir in getOrCreateLocalRootDirs...
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/util/Utils.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala index df21ed37e7..4803ff9403 100644 --- a/core/src/main/scala/org/apache/spark/util/Utils.scala +++ b/core/src/main/scala/org/apache/spark/util/Utils.scala @@ -696,7 +696,7 @@ private[spark] object Utils extends Logging { try { val rootDir = new File(root) if (rootDir.exists || rootDir.mkdirs()) { - val dir = createDirectory(root) + val dir = createTempDir(root) chmod700(dir) Some(dir.getAbsolutePath) } else { |