avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Linehan <pline...@plinehan.com>
Subject schema resolution and record names
Date Sat, 02 Oct 2010 00:45:16 GMT
i'm doing some experimenting, and noticed that schema resolution is not
working quite as i had expected.

for example, i have two record schemas, one called R1 in namespace N1 and
one called R2 in namespace N2.  other than their names and namespaces, the
records contain exactly the same field names and types.  i create an avro
data file containing records of type N1.R1.  i can then read that file with
a "specific" reader of type N2.R2.  a generic reader reveals that the data
file does indeed have the original N1.R1 schema, however.

this is actually the behavior i want, as it would allow me to move and
rename "specific" record classes in my java code without breaking serialized
compatibility.  however, it seems to violate the schema resolution rules
found in the avro documentation:


am i misunderstanding the documentation?  is the behavior i'm seeing
expected?  when does a record name/namespace conflict actually cause an
error to be thrown?

View raw message