from
public static org.apache.avro.io.DatumReader<Object> from(String writerSchemaDefinition,
AvroRecordType avroRecordType)
throws InstantiationException,
IllegalAccessException
This method is used to create Avro datum reader for deserialization. By
default, it is GenericDatumReader; SpecificDatumReader will only be created
if the user specifies. In this case, the program will check if the user have
those specific code-generated schema class locally. ReaderSchema will be
supplied if the user wants to use a specific schema to deserialize the
message. (Compatibility check will be invoked)
- Parameters:
writerSchemaDefinition - Avro record writer schema.
- Returns:
- Avro datum reader for de-serialization
- Throws:
InstantiationException - can be thrown for readerClass.newInstance()
from java.lang.Class implementation
IllegalAccessException - can be thrown readerClass.newInstance() from
java.lang.Class implementation