Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/10609#discussion_r48993279
--- Diff:
core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala ---
@@ -166,6 +166,15 @@ class KryoSerializer(conf: SparkConf)
kryo.register(Utils.classForName("scala.collection.immutable.$colon$colon"))
kryo.register(classOf[ArrayBuffer[Any]])
+ // Add classes for Streaming
+ try {
+ kryo.register(
+
Utils.classForName("org.apache.spark.streaming.util.OpenHashMapBasedStateMap"),
--- End diff --
There is a tricky thing here.
Kryo assigns an unique id to each registered class and only writes its id,
so the register order of classes should be same. Otherwise, the ids won't be
matched and deserialization will fail.
However, for tests that start a local cluster, their executors have
`OpenHashMapBasedStateMap` but the driver doesn't. So I added
`OpenHashMapBasedStateMap` at the last class to make sure other classes's ids
are same.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]