You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/11/03 14:16:18 UTC

[GitHub] [pulsar] geomagilles opened a new issue #8430: Custom SchemaReader/SchemaWriter are not working for Avro schemas

geomagilles opened a new issue #8430:
URL: https://github.com/apache/pulsar/issues/8430


   **Describe the bug**
   When using `Schema.AVRO(mySchemaDefinition)` custom SchemaWriter/SchemaReader provided in `mySchemaDefinition` are not used even if present in mySchemaDefinition.
   
   The use case is to be able to serialize/deserialize Kotlin data classes using avro4k package by providing custom Avro reader/writer. 
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Go to '...'
   2. Click on '....'
   3. Scroll down to '....'
   4. See error
   
   **Expected behavior**
   This could work
   ```
       val schemaDefinition = SchemaDefinition.builder<TaskEngineEnvelope>()
           .withJsonDef(Avro.default.schema(MyMessage.serializer()).toString())
           .withSchemaReader(MyMessageReader())
           .withSchemaWriter(MyMessageWriter())
           .withSupportSchemaVersioning(true)
           .build()
   
       val client = PulsarClient.builder()
           .serviceUrl("pulsar://localhost:6650")
           .build()
   
       val consumer = client.newConsumer(Schema.AVRO(schemaDefinition))...
   ```
   
   **Additional context**
   Maybe there is another way?
   


----------------------------------------------------------------
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



[GitHub] [pulsar] geomagilles commented on issue #8430: Custom SchemaReader/SchemaWriter are not working for Avro schemas

Posted by GitBox <gi...@apache.org>.
geomagilles commented on issue #8430:
URL: https://github.com/apache/pulsar/issues/8430#issuecomment-724619997


   > @geomagilles 2.6.2 have been voted, so it will move to 2.7.0, 2.7.0 will release immediately after 2.6.2 finish.
   
   ok, thx


----------------------------------------------------------------
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



[GitHub] [pulsar] congbobo184 commented on issue #8430: Custom SchemaReader/SchemaWriter are not working for Avro schemas

Posted by GitBox <gi...@apache.org>.
congbobo184 commented on issue #8430:
URL: https://github.com/apache/pulsar/issues/8430#issuecomment-723075687


   @geomagilles  #8464 this PR add the support of avro schema user define reader and writer and add a interface to handle the multi version schema. you can define the reader and writer by yourself.


----------------------------------------------------------------
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



[GitHub] [pulsar] congbobo184 commented on issue #8430: Custom SchemaReader/SchemaWriter are not working for Avro schemas

Posted by GitBox <gi...@apache.org>.
congbobo184 commented on issue #8430:
URL: https://github.com/apache/pulsar/issues/8430#issuecomment-723709401


   @geomagilles  hello, if use AvroSchema will have multi version schema, so we should generate different version reader to decode the data. this PR will change, add the MultiVersionReader to solve the question. 


----------------------------------------------------------------
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



[GitHub] [pulsar] geomagilles edited a comment on issue #8430: Custom SchemaReader/SchemaWriter are not working for Avro schemas

Posted by GitBox <gi...@apache.org>.
geomagilles edited a comment on issue #8430:
URL: https://github.com/apache/pulsar/issues/8430#issuecomment-723550820


   @congbobo184 Thx! I'm not able to run the PR myself as I do not manage yet to run Pulsar from sources - but it seems good to me. 
   
   Note: I'm not sure what is the purpose of the getSchemaReaderBySchemaInfo interface -  can you clarify that for me, please?


----------------------------------------------------------------
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



[GitHub] [pulsar] codelipenghui commented on issue #8430: Custom SchemaReader/SchemaWriter are not working for Avro schemas

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #8430:
URL: https://github.com/apache/pulsar/issues/8430#issuecomment-722780799


   @congbobo184 Could you please take a look at this issue?


----------------------------------------------------------------
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



[GitHub] [pulsar] codelipenghui closed issue #8430: Custom SchemaReader/SchemaWriter are not working for Avro schemas

Posted by GitBox <gi...@apache.org>.
codelipenghui closed issue #8430:
URL: https://github.com/apache/pulsar/issues/8430


   


----------------------------------------------------------------
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



[GitHub] [pulsar] geomagilles commented on issue #8430: Custom SchemaReader/SchemaWriter are not working for Avro schemas

Posted by GitBox <gi...@apache.org>.
geomagilles commented on issue #8430:
URL: https://github.com/apache/pulsar/issues/8430#issuecomment-724262038


   @congbobo184  thx - do you think it could be included in the next release?
   


----------------------------------------------------------------
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



[GitHub] [pulsar] congbobo184 commented on issue #8430: Custom SchemaReader/SchemaWriter are not working for Avro schemas

Posted by GitBox <gi...@apache.org>.
congbobo184 commented on issue #8430:
URL: https://github.com/apache/pulsar/issues/8430#issuecomment-724395056


   @geomagilles 2.6.2 have been voted, so it will move to 2.7.0, 2.7.0 will release immediately after 2.6.2 finish.
   
   


----------------------------------------------------------------
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



[GitHub] [pulsar] geomagilles commented on issue #8430: Custom SchemaReader/SchemaWriter are not working for Avro schemas

Posted by GitBox <gi...@apache.org>.
geomagilles commented on issue #8430:
URL: https://github.com/apache/pulsar/issues/8430#issuecomment-723550820


   @congbobo184 Thx! I'm not able to run the PR myself as I do not manage yet to run Pulsar from sources - but it seems good to me. 
   
   Note: I'm not sure how to handle schema version and use getSchemaReaderBySchemaInfo - can you please point me to the documentation?


----------------------------------------------------------------
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