On 11/09/2010 02:46 PM, Doug Cutting wrote:
For example, we could add a datafile reader interface that both the 1.2
and 1.4 version implement, then have a factory that creates one or the
other after reading the file header. Then you'd not need to rewrite
files: the Java implementation would be able to read both versions
transparently.
Just realized I already added that interface:
http://avro.apache.org/docs/current/api/java/org/apache/avro/file/FileReader.html
(This was added to permit transparent reading of SequenceFiles using
Avro reflection.)
So, in AVRO-692, I'd need to make DataFileReader12 implement this, then
add a factory that creates an appropriate reader after sniffing a file.
Doug