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

Coder information lost in Kafka Read

Details

    • Bug
    • Status: Open
    • P3
    • Resolution: Unresolved
    • 2.36.0
    • None
    • io-java-kafka

    Description

      When upgrading from 2.29.0 to 2.36.0 our Kafka Read transform broke.
      While debugging, I saw that information of the key and value coders is lost after this statement in KafkaIO:

      return output.apply(readTransform).setCoder(KafkaRecordCoder.of(keyCoder, valueCoder));
      

      The issue seems to be that output.apply already checks for the presence of key and value coders and ends up trying to infer them with the help of LocalDeserializerProvider, so the process never arrives at setCoder.
      In our case this inference fails since we implement the Deserializer interface in a super class of the instance passed as the deserializer (I assume it would also fail afterwards since we don't register our coders with the registry).

      This was not yet broken on 2.29.0, so all versions after that could be affected.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jgrabber Jonas Grabber
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: