Uploaded image for project: 'Apache Hudi'
  1. Apache Hudi
  2. HUDI-2320

Add support ByteArrayDeserializer in AvroKafkaSource

    XMLWordPrintableJSON

Details

    Description

      When the 'value.serializer' of Kafka Avro Producer is 'org.apache.kafka.common.serialization.ByteArraySerializer',Use the following configuration

      --source-class org.apache.hudi.utilities.sources.AvroKafkaSource \
      --schemaprovider-class org.apache.hudi.utilities.schema.JdbcbasedSchemaProvider \
      --hoodie-conf "hoodie.deltastreamer.source.kafka.value.deserializer.class=org.apache.kafka.common.serialization.ByteArrayDeserializer"
      

      For now,It will throw an exception::

      java.lang.ClassCastException: [B cannot be cast to org.apache.avro.generic.GenericRecord

      After support ByteArrayDeserializer,Use the configuration above,It works properly.And there is no need to provide 'schema.registry.url',For example, we can use the JdbcbasedSchemaProvider to get the sourceSchema

      Attachments

        Issue Links

          Activity

            People

              dongkelun 董可伦
              dongkelun 董可伦
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: