[FLINK-3088] [serialization] Fix copy method of TypeSerializer which use Kryo
Some TypeSerializer, WritableSerializer, ValueSerializer, and AvroSerializer, and comparators, WritableComparator and ValueComparator, use Kryo to copy records. In case where the Kryo serializer cannot copy the record, the copy method fails. This is however not necessary, because one can copy the element by serializing the record to a byte array and deserializing it from this array. This PR adds this behaviour to the respective classes. Adds KryoUtils tool with copy method to avoid code duplication This closes #1415. Adds comments to KryoUtils functions
Showing
想要评论请 注册 或 登录