Class DatumReaderInstance
java.lang.Object
com.amazonaws.services.schemaregistry.deserializers.avro.DatumReaderInstance
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.avro.io.DatumReader<Object>from(String writerSchemaDefinition, AvroRecordType avroRecordType) This method is used to create Avro datum reader for deserialization.
-
Constructor Details
-
DatumReaderInstance
public DatumReaderInstance()
-
-
Method Details
-
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 implementationIllegalAccessException- can be thrown readerClass.newInstance() from java.lang.Class implementation
-