Skip to content

Commit 89eb1b6

Browse files
author
Denis Bolshakov
committed
[SPARK-9002][CORE] KryoSerializer initialization does not include 'Array[Int]'
extending list of checked classes for Kryo registration
1 parent 20517a5 commit 89eb1b6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/src/test/scala/org/apache/spark/serializer/KryoSerializerSuite.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ class KryoSerializerSuite extends SparkFunSuite with SharedSparkContext {
109109
}
110110

111111
test("pairs") {
112+
val conf = new SparkConf(false)
113+
conf.set("spark.kryo.registrationRequired", "true")
114+
112115
val ser = new KryoSerializer(conf).newInstance()
113116
def check[T: ClassTag](t: T) {
114117
assert(ser.deserialize[T](ser.serialize(t)) === t)
@@ -133,12 +136,16 @@ class KryoSerializerSuite extends SparkFunSuite with SharedSparkContext {
133136
}
134137

135138
test("Scala data structures") {
139+
val conf = new SparkConf(false)
140+
conf.set("spark.kryo.registrationRequired", "true")
141+
136142
val ser = new KryoSerializer(conf).newInstance()
137143
def check[T: ClassTag](t: T) {
138144
assert(ser.deserialize[T](ser.serialize(t)) === t)
139145
}
140146
check(List[Int]())
141147
check(List[Int](1, 2, 3))
148+
check(Seq[Int](1, 2, 3))
142149
check(List[String]())
143150
check(List[String]("x", "y", "z"))
144151
check(None)

0 commit comments

Comments
 (0)