Re: KafkaIO.write and Avro

2022-02-09 Thread Matt Casters
IDE suggests: >>>>>>> >>>>>>> .withValueSerializer((Class>) >>>>>>> KafkaAvroSerializer.class) >>>>>>> >>>>>>> ... which simply doesn't even compile for me. >>>>>>> &g

Re: KafkaIO.write and Avro

2022-02-09 Thread Matt Casters
So yes, reading the generic records with a consumer worked great. It's really convenient to have a way of handling both the coder and the deserializer at once. To test I hooked KafkaIO up to a free Confluent Cloud service with schema registry. Reading works great and once I have my next fixes read

Re: KafkaIO.write and Avro

2022-02-09 Thread Alexey Romanenko
look, it looks like the respective interface in KafkaIO > should rather look like this to support KafkaAvroSerializer, which is a > Serializer: > > > > public Write withValueSerializer(Class V>> valueSerializer) > > > > Thoughts? > > Cheers

Re: KafkaIO.write and Avro

2022-02-09 Thread Alexey Romanenko
> On 8 Feb 2022, at 14:16, Matt Casters wrote: > > For KafkaIO.read() we made a specific provision in the form of class > ConfluentSchemaRegistryDeserializer but it doesn't look like we covered the > producer side of Avro values yet. Talking about read from Kafka with Avro and Confluent Schem

Re: KafkaIO.write and Avro

2022-02-09 Thread Kenneth Knowles
create a PR to amend the Javadoc for >>>>> KafkaIO. >>>>> >>>>> https://issues.apache.org/jira/browse/BEAM-13854 >>>>> >>>>> Easier to figure out was AvroCoder.of(schema) but it might make sense >>>>> to document

Re: KafkaIO.write and Avro

2022-02-09 Thread Matt Casters
t;>> >>>> Thanks again! >>>> >>>> Cheers, >>>> Matt >>>> >>>> >>>> On Tue, Feb 8, 2022 at 4:09 PM Moritz Mack wrote: >>>> >>>>> Just having a quick look, it looks lik

Re: KafkaIO.write and Avro

2022-02-09 Thread Kenneth Knowles
t; Cheers, >>> Matt >>> >>> >>> On Tue, Feb 8, 2022 at 4:09 PM Moritz Mack wrote: >>> >>>> Just having a quick look, it looks like the respective interface in >>>> KafkaIO should rather look like this to support KafkaAvroSerializer, which >&g

Re: KafkaIO.write and Avro

2022-02-08 Thread Matt Casters
rializer: > > > > public Write withValueSerializer(Class V>> valueSerializer) > > > > Thoughts? > > Cheers, Moritz > > > > *From: *Moritz Mack > *Date: *Tuesday, 8. February 2022 at 15:55 > *To: *dev@beam.apache.org , matt.cast...@neo4j.com < > matt.

Re: KafkaIO.write and Avro

2022-02-08 Thread Moritz Mack
ary 2022 at 15:55 To: dev@beam.apache.org , matt.cast...@neo4j.com Subject: Re: KafkaIO.write and Avro Hi Matt, Unfortunately, the types don’t play well when using KafkaAvroSerializer. It currently requires a cast :/ The following will work: write.withValueSerializer((Class)KafkaAvroSerializer.cl

Re: KafkaIO.write and Avro

2022-02-08 Thread Moritz Mack
Hi Matt, Unfortunately, the types don’t play well when using KafkaAvroSerializer. It currently requires a cast :/ The following will work: write.withValueSerializer((Class)KafkaAvroSerializer.class)) This seems to be the cause of repeated confusion, so probably worth improving the user experien