Skip to content

Commit 42f3abd

Browse files
AnkitGuavusrxin
authored andcommitted
[SPARK-2306]:BoundedPriorityQueue is private and not registered with Kry...
Due to the non registration of BoundedPriorityQueue with kryoserializer, operations which are dependend on BoundedPriorityQueue are giving exceptions.One such instance is using top along with kryo serialization. Fixed the issue by registering BoundedPriorityQueue with kryoserializer. Author: ankit.bhardwaj <[email protected]> Closes #1299 from AnkitBhardwaj12/BoundedPriorityQueueWithKryoIssue and squashes the following commits: a4ae8ed [ankit.bhardwaj] [SPARK-2306]:BoundedPriorityQueue is private and not registered with Kryo
1 parent 9d006c9 commit 42f3abd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import org.apache.spark.broadcast.HttpBroadcast
3030
import org.apache.spark.scheduler.MapStatus
3131
import org.apache.spark.storage._
3232
import org.apache.spark.storage.{GetBlock, GotBlock, PutBlock}
33+
import org.apache.spark.util.BoundedPriorityQueue
3334

3435
import scala.reflect.ClassTag
3536

@@ -183,7 +184,8 @@ private[serializer] object KryoSerializer {
183184
classOf[GetBlock],
184185
classOf[MapStatus],
185186
classOf[BlockManagerId],
186-
classOf[Array[Byte]]
187+
classOf[Array[Byte]],
188+
classOf[BoundedPriorityQueue[_]]
187189
)
188190
}
189191

0 commit comments

Comments
 (0)