On 12/01/2011 07:32 PM, Koert Kuipers wrote:
> I am reading from avro container files in hadoop. I know the container
> files have a (writers) schema stored in them. My reader specifies it's
> schema using avro.input.schema job parameter. This way any schema
> changes are gracefully handled with both schema's present.
>
> However, i dont always need all this complexity. Is there a way to read
> without having to specify a reader's schema, where i basically say "just
> accept the writer's schema and read the data that way".
That's what's done by default if you, e.g., do something like:
Iterable i = DataFileReader.openReader(file, new GenericDatumReader());
for (Object o : i) {
System.out.println(o);
}
Doug