NetanelRabinowitz NetanelRabinowitz -4 years ago 83
Scala Question

Is there a way to support schema evolution in avro4s

Is there a way to read bytesArray via the

AvroInputStream.binary
api
and somehow specify the writer version ?

val in = new ByteArrayInputStream(bytesFromFile)
val input = AvroInputStream.binary[newClass](in)// old ?
val result = input.iterator.toSeq


in other words is avro4s support schema evolution with binary records ?

Answer Source

Does avro4s support schema evolution with binary records?

No. Avro in general supports Schema Evolution when you provide it a schema, it can match against the name of the properties and their types. When there's no schema, it relays on the order of declarations both the serializing and deserializing side. If you modify your classes, you break compatibility.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download