Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
Description
The AvroSerializer currently has a AvroSerializer(Class<T> type, Schema schema) public constructor when used for generic records.
This is a bit confusing, because when using the AvroSerializer, the type to be serialized should always be a GenericData.Record type.
We should either:
- have a separate subclass of AvroSerializer, say GenericRecordAvroSerializer that is a AvroSerializer<GenericRecord>, or
- follow a similar approach to the instantiation methods in the AvroDeserialiationSchema.