Search code examples
serializationgoogle-cloud-dataflowapache-beamspotify-scio

How does Scio fallback to Kryo


I see that Scio fallsback to Kryo coder rather than Java Serializer which is default coder used for Dataflow when coder cannot be inferred/found via CoderRegistry. I don't see any reference to setFallbackCoderProvider anywhere, how does Scio registers the fallback to KryoAtomicCoder?


Solution

  • Up to Scio v0.6.x it happens here: https://github.com/spotify/scio/blob/v0.6.1/scio-core/src/main/scala/com/spotify/scio/Implicits.scala#L55

    Coder lookup and derivation has changed significantly since v0.7.x. It's still under heavy development but for more details see: https://github.com/spotify/scio/wiki/Coders