How do you extract first the schema and then the data from an avro file in Java? Identical to this question except in java.
I've seen examples of how to get the schema from an avsc file but not an avro file. What direction should I be looking in?
Schema schema = new Schema.Parser().parse(
new File("/home/Hadoop/Avro/schema/emp.avsc")
);
DataFileReader<GenericRecord>.OpenReader(filename);
can be used to instantiate thedataFileReader
. Once instantiated, it the dataFileReader is used just like in Java. – Demodulator