Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-9202

AvroSerializer should not be serializing the target Avro type class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Not A Problem
    • None
    • None
    • None

    Description

      The AvroSerializer contains this field which is written when the serializer is written into savepoints:
      https://github.com/apache/flink/blob/be7c89596a3b9cd8805a90aaf32336ec2759a1f7/flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSerializer.java#L78

      This causes Avro schema evolution to not work properly, because Avro generated classes have non-fixed serialVersionUIDs. Once a new Avro class is generated with a new schema, that class can not be loaded on restore due to incompatible UIDs, and thus the serializer can not be successfully deserialized.

      A possible solution would be to only write the classname, and dynamically load the class into a transient field.

      Attachments

        Issue Links

          Activity

            People

              tzulitai Tzu-Li (Gordon) Tai
              tzulitai Tzu-Li (Gordon) Tai
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: