Github user ConeyLiu commented on a diff in the pull request: https://github.com/apache/spark/pull/19586#discussion_r147368002 --- Diff: core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala --- @@ -205,11 +205,45 @@ class KryoSerializationStream( private[this] var kryo: Kryo = serInstance.borrowKryo() + // This is only used when we write object and class separately. + var classWrote = false --- End diff -- Yeah, it used for `writeAll / asIterator`. But for `MemoryStorea.putIteratorAsBytes`, we don't use the writeAll, we use this state to indicate whether we have written the class first.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org