apache-sparkkryokryonet

Does Kryo Automatically Register Classes Used in Fields?


Using Spark, decided to use Kryo since it is the recommended de/serializer.

Say I have:

public Class1 {
  private Class2 field1;
}

Do I need to register both Class1 & Class2 or just registering Class1 automatically also register Class2?


Solution

  • I tested this, and in fact Class2 will also need to be registered.