Skip to content

Commit

Permalink
Deleting temp output directory when done
Browse files Browse the repository at this point in the history
  • Loading branch information
kellrott committed Feb 24, 2014
1 parent 95c7f67 commit 0e6f808
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ package org.apache.spark.storage

import org.scalatest.FunSuite
import org.apache.spark.{LocalSparkContext, SparkContext}
import org.apache.commons.io.FileUtils
import java.io.File

class Expander(base:String, count:Int) extends Iterator[String] {
var i = 0;
Expand Down Expand Up @@ -51,5 +53,6 @@ class LargeIteratorSuite extends FunSuite with LocalSparkContext {
) );
val out = seeds.flatMap(Expander.expand(_,10000000));
out.map(_ + "...").persist(StorageLevel.DISK_ONLY).saveAsTextFile("./test.out")
FileUtils.deleteDirectory(new File("./test.out"))
}
}

0 comments on commit 0e6f808

Please sign in to comment.