You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avro can serialize lots of toplevel things that are NOT records (primitives, etc.), but RecordDeserializer.java::handleAvro() assumes Record, and croaks when deserializing, say, a key schema describing "just a long encoding of a timestatmp", used as key schema of topic WeatherData within our test custom data cluster.
....
Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to org.apache.avro.generic.GenericData$Record
at io.confluent.idesidecar.restapi.messageviewer.RecordDeserializer.handleAvro(RecordDeserializer.java:134)
...
Enums, Arrays, Maps, Fixed, and primitives could all be the toplevel type, not just Records, and will probably deserialize to distinct java-side classes, not GenericData.Record.
It does not appear to me that JSONSchema or Protobuf will have the same weakness:
As far as I can see, Protobuf messages are always the equivalent of a record, perhaps though just encapsulating a single field.
Despite JSON being similar to Avro in allowing toplevel primitives and arrays (not objects), the deserialization code in sidecar treats as a JsonNode only, which will handle all.
The text was updated successfully, but these errors were encountered:
Avro can serialize lots of toplevel things that are NOT records (primitives, etc.), but RecordDeserializer.java::handleAvro() assumes Record, and croaks when deserializing, say, a key schema describing "just a long encoding of a timestatmp", used as key schema of topic WeatherData within our test custom data cluster.
Schema WeatherData-key:
The exception raised:
....
Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to org.apache.avro.generic.GenericData$Record
at io.confluent.idesidecar.restapi.messageviewer.RecordDeserializer.handleAvro(RecordDeserializer.java:134)
...
Enums, Arrays, Maps, Fixed, and primitives could all be the toplevel type, not just Records, and will probably deserialize to distinct java-side classes, not
GenericData.Record
.It does not appear to me that JSONSchema or Protobuf will have the same weakness:
The text was updated successfully, but these errors were encountered: