Skip to content
Browse files

Small clean-up to flatmap tests

  • Loading branch information...
1 parent 9ae919c commit 33baf14b04bcb5cb8dc39ae0773b9e0ef79ef9cf @pwendell pwendell committed Mar 6, 2014
Showing with 3 additions and 8 deletions.
  1. +3 −8 core/src/test/scala/org/apache/spark/storage/FlatmapIteratorSuite.scala
View
11 core/src/test/scala/org/apache/spark/storage/FlatmapIteratorSuite.scala
@@ -33,34 +33,29 @@ class FlatmapIteratorSuite extends FunSuite with LocalSparkContext {
* info from the serializer, and allow old objects to be GC'd
*/
test("Flatmap Iterator to Disk") {
- val sconf = new SparkConf().setMaster("local-cluster[1,1,512]")
- .setAppName("iterator_to_disk_test")
+ val sconf = new SparkConf().setMaster("local").setAppName("iterator_to_disk_test")
sc = new SparkContext(sconf)
val expand_size = 100
val data = sc.parallelize((1 to 5).toSeq).
flatMap( x => Stream.range(0, expand_size))
var persisted = data.persist(StorageLevel.DISK_ONLY)
- println(persisted.count())
assert(persisted.count()===500)
assert(persisted.filter(_==1).count()===5)
}
test("Flatmap Iterator to Memory") {
- val sconf = new SparkConf().setMaster("local-cluster[1,1,512]")
- .setAppName("iterator_to_disk_test")
+ val sconf = new SparkConf().setMaster("local").setAppName("iterator_to_disk_test")
sc = new SparkContext(sconf)
val expand_size = 100
val data = sc.parallelize((1 to 5).toSeq).
flatMap(x => Stream.range(0, expand_size))
var persisted = data.persist(StorageLevel.MEMORY_ONLY)
- println(persisted.count())
assert(persisted.count()===500)
assert(persisted.filter(_==1).count()===5)
}
test("Serializer Reset") {
- val sconf = new SparkConf().setMaster("local-cluster[1,1,512]")
- .setAppName("serializer_reset_test")
+ val sconf = new SparkConf().setMaster("local").setAppName("serializer_reset_test")
.set("spark.serializer.objectStreamReset", "10")
sc = new SparkContext(sconf)
val expand_size = 500

0 comments on commit 33baf14

Please sign in to comment.
Something went wrong with that request. Please try again.