Repository: spark
Updated Branches:
  refs/heads/master 7216f4054 -> 0fff8eb3e


[SPARK-11869][ML] Clean up TempDirectory properly in ML tests

Need to remove parent directory (```className```) rather than just tempDir 
(```className/random_name```)

I tested this with IDFSuite, which has 2 read/write tests, and it fixes the 
problem.

CC: mengxr  Can you confirm this is fine?  I believe it is since the same 
```random_name``` is used for all tests in a suite; we basically have an extra 
unneeded level of nesting.

Author: Joseph K. Bradley <jos...@databricks.com>

Closes #9851 from jkbradley/tempdir-cleanup.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/0fff8eb3
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/0fff8eb3
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/0fff8eb3

Branch: refs/heads/master
Commit: 0fff8eb3e476165461658d4e16682ec64269fdfe
Parents: 7216f40
Author: Joseph K. Bradley <jos...@databricks.com>
Authored: Thu Nov 19 23:42:24 2015 -0800
Committer: Xiangrui Meng <m...@databricks.com>
Committed: Thu Nov 19 23:42:24 2015 -0800

----------------------------------------------------------------------
 mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/0fff8eb3/mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala
----------------------------------------------------------------------
diff --git a/mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala 
b/mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala
index 2742026..c8a0bb1 100644
--- a/mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala
+++ b/mllib/src/test/scala/org/apache/spark/ml/util/TempDirectory.scala
@@ -35,7 +35,7 @@ trait TempDirectory extends BeforeAndAfterAll { self: Suite =>
 
   override def beforeAll(): Unit = {
     super.beforeAll()
-    _tempDir = Utils.createTempDir(this.getClass.getName)
+    _tempDir = Utils.createTempDir(namePrefix = this.getClass.getName)
   }
 
   override def afterAll(): Unit = {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to