[
https://issues.apache.org/jira/browse/FLINK-29864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
christofe lintermans closed FLINK-29864.
----------------------------------------
Resolution: Not A Bug
Issue with namespaces,
it was trying to resolve the class based on namespace defined in Avro schema,
but the namespace was not correct.
> AvroDeserializationSchema.forSpecific still generates genericdata.record
> ------------------------------------------------------------------------
>
> Key: FLINK-29864
> URL: https://issues.apache.org/jira/browse/FLINK-29864
> Project: Flink
> Issue Type: Bug
> Components: API / DataStream
> Affects Versions: 1.15.2
> Reporter: christofe lintermans
> Priority: Major
>
> I've generated AVRO classes based on AVRO specs.
> But whatever I do, the AvroDeserializationSchema.forSpecific still generates
> GenericRecord objects instead of the desired destination classes.
> I've also tried the RegistryAvroDeserializationSchema but the same issue pops
> up.
> {code:java}
> RegistryAvroDeserializationSchema<InputDataPoints>
> registryAvroDeserializationSchema = new RegistryAvroDeserializationSchema<>(
> InputDataPoints.class,
> null,
> () -> new SchemaCoder() {
> @Override
> public Schema readSchema(InputStream inputStream) throws
> IOException {
> return InputDataPoints.getClassSchema();
> }
> @Override
> public void writeSchema(Schema schema, OutputStream outputStream)
> throws IOException {
> }
> });
>
> {code}
>
> When debugging, I notice SpecificDatumReader is being generated instead of
> GenericDatumReader, but still it produces the wrong types.
> AvroSerializationSchema.forSpecific works fine and generates a correct byte
> array based on the AVRO classes objects.
> Any suggestion how I can force the specific usage?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)