The code needs both schemas, and then it can resolve the difference between the schemas and read the old data using the new schema.
In the Java API this usually means passing the old 'writer' schema as well as the new 'reader' schema to the object responsible for reading the data. As Doug described, the 'writer' schema must be available somehow, either by storing it with the data or from a reference. For example, the Avro Data File format stores the schema that all records in the file conform to in the file header. Then any reader can discover the written schema when opening the file. -Scott On 7/27/11 3:24 AM, "Giancarlo Frison" <[email protected]> wrote: > Hi all, > > I'm wondering if it's possible to load stored records with extends schemas. > If I store a record with 3 fields, is it possible by any chance to load it by > an extended schema definition (for instance with one field more)? > I tried it but the serialized record is unreadable by the newest schema. What > I can do to accomplish this purpose? > > thanks, > > -- > > Giancarlo Frison > > http://gfrison.com >
