pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] gaoran10 edited a comment on issue #6034: [Pulsar IO][Issue 5633]Support avro schema for debezium connector
Date Fri, 17 Apr 2020 06:24:30 GMT
gaoran10 edited a comment on issue #6034: [Pulsar IO][Issue 5633]Support avro schema for debezium
connector
URL: https://github.com/apache/pulsar/pull/6034#issuecomment-615020718
 
 
   I have made some changes, use the JsonConverter as before, and the AvroConverter is used
differently from the JsonConverter, the user has two ways to use it.
   
   1. The schema is the same as below, we could process the GenericRecord. Tip: use the `KeyValueEncodingType.SEPARATED`
encoding type.
   
       `Schema<KeyValue<GenericRecord, GenericRecord>> schema = 
                              Schema.KeyValue(Schema.AUTO_CONSUME(), Schema.AUTO_CONSUME(),

                                                   KeyValueEncodingType.SEPARATED);` 
   
   2. We could get the original byte array through the method `getKeyBytes()` and `getData()`
of the `Message`, the original byte array is converted by the AvroConverter.
   
   @tuteng @sijie @jiazhai @codelipenghui Please have a review. Thanks.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message