aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/scala
diff options
context:
space:
mode:
authorShivaram Venkataraman <shivaram@eecs.berkeley.edu>2013-05-28 16:27:16 -0700
committerShivaram Venkataraman <shivaram@eecs.berkeley.edu>2013-05-28 16:27:16 -0700
commitfbc1ab346867d5c81dc59e4c8d85aeda2f516ce2 (patch)
tree4a24eb7206009d046cdaa5bd59606713d5c179d0 /core/src/test/scala
parent3db1e17baa11fa37b0c7f04d7213a30df66d1611 (diff)
downloadspark-fbc1ab346867d5c81dc59e4c8d85aeda2f516ce2.tar.gz
spark-fbc1ab346867d5c81dc59e4c8d85aeda2f516ce2.tar.bz2
spark-fbc1ab346867d5c81dc59e4c8d85aeda2f516ce2.zip
Couple of Netty fixes
a. Fix the port number by reading it from the bound channel b. Fix the shutdown sequence to make sure we actually block on the channel c. Fix the unit test to use two JVMs.
Diffstat (limited to 'core/src/test/scala')
-rw-r--r--core/src/test/scala/spark/ShuffleSuite.scala14
1 files changed, 13 insertions, 1 deletions
diff --git a/core/src/test/scala/spark/ShuffleSuite.scala b/core/src/test/scala/spark/ShuffleSuite.scala
index fdee7ca384..a4fe14b9ae 100644
--- a/core/src/test/scala/spark/ShuffleSuite.scala
+++ b/core/src/test/scala/spark/ShuffleSuite.scala
@@ -305,9 +305,20 @@ class ShuffleSuite extends FunSuite with ShouldMatchers with LocalSparkContext {
assert(c.partitioner.get === p)
}
+ test("shuffle local cluster") {
+ // Use a local cluster with 2 processes to make sure there are both local and remote blocks
+ sc = new SparkContext("local-cluster[2,1,512]", "test")
+ val a = sc.parallelize(1 to 10, 2)
+ val b = a.map {
+ x => (x, x * 2)
+ }
+ val c = new ShuffledRDD(b, new HashPartitioner(3))
+ assert(c.count === 10)
+ }
+
test("shuffle serializer") {
// Use a local cluster with 2 processes to make sure there are both local and remote blocks
- sc = new SparkContext("local-cluster[1,2,512]", "test")
+ sc = new SparkContext("local-cluster[2,1,512]", "test")
val a = sc.parallelize(1 to 10, 2)
val b = a.map { x =>
(x, new ShuffleSuite.NonJavaSerializableClass(x * 2))
@@ -317,6 +328,7 @@ class ShuffleSuite extends FunSuite with ShouldMatchers with LocalSparkContext {
val c = new ShuffledRDD(b, new HashPartitioner(3), classOf[spark.KryoSerializer].getName)
assert(c.count === 10)
}
+
}
object ShuffleSuite {