I refactor my code to work with kryo serialization. Everything works fine except deserialize a property of geomtry from certain class. No exception is thrown (I set "spark.kryo.registrationRequired" to true). On debug I try to collect the data and I see that the data in the geomtry is just empty. As a result I understand that the deserialize was fail. Geomtry is from type of - Any(scala) because it is a complex property maybe. My question is why the data is empty, And is there connection to the type 'Any' of the property.
Update :
class code: class Entity(val id:String) extends Serializable{
var index:Any = null
var geometry:Any = null
}
geometry contains centeroid, shape and coordinates(complex object)