On 26.09.24 04:38, André Araújo wrote:
> // but collecting values from the RDD fails with serialization issues
What's the RDD? (I know nothing about Spark.)
> com.esotericsoftware.kryo.KryoException: Unable to find class:
> [L$line577.$read$$iw$$iw$Data;
> at
> com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:160)
This means that Kryo cannot find the bytecode for class
[L$line577.$read$$iw$$iw$Data .
This looks like a class generated by the compiler, likely for a closure;
for some reason, your data contains such a thing, maybe because Scala
chose to not evaluate the closure (no idea if Scala has lazy evaluation)
or because the data structure was explicitly defined to contain a closure.
My conjecture would be:
Step 1: The Scala compiler generates that [L$line577.$read$$iw$$iw$Data
class, a data structure with a closure is serialized using that class.
Step 2: The Scala code is modified, or merely recompiled with different
options. Whatever the reason, the class generated for the closure now
has a different name than [L$line577.$read$$iw$$iw$Data .
Step 3: The new version tries to read the serialized data but cannot
interpret it because it has the class under a different name.
Disclaimer: My assumptions about what Scala does may be totally wrong,
or the problem might stem from some entirely different problem.
I'm just offering an answer since nobody else responded (yet).
HTH, and if it does not, please ignore.
Regards,
Jo