Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-12628

AvroCoder changed underlying String class for SpecificRecords

Details

    • Bug
    • Status: Triage Needed
    • P1
    • Resolution: Fixed
    • 2.30.0
    • 2.33.0
    • io-java-avro
    • None

    Description

      The AvroCoder changes for BEAM-2303 changes the reader/writer from the Avro ReflectDatum* classes to the SpecificDatum* classes.

      Because of the way Avro handles Strings, however, the underlying instances for String data are deserialised as org.apache.avro.util.Utf8 instances instead of java.lang.String.

      This causes:
      1. an unexpected behaviour change when migrating to Beam 2.30.0
      2. potential serialization issues when using these String instances (Utf8 instances don't implement Serializable)
      3. an inconsistent API between AvroCoder and AvroSink/AvroSource (the latter still use ReflectDatum*)

      (Original report on the mailing list and PR)

      Attachments

        Issue Links

          Activity

            People

              clairemcginty Claire McGinty
              rskraba Ryan Skraba
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 6h 20m
                  6h 20m