Class AvroDeserializer
- java.lang.Object
-
- com.amazonaws.services.schemaregistry.deserializers.avro.AvroDeserializer
-
- All Implemented Interfaces:
GlueSchemaRegistryDataFormatDeserializer
public class AvroDeserializer extends Object implements GlueSchemaRegistryDataFormatDeserializer
Avro specific de-serializer responsible for handling the Avro protocol specific conversion behavior.
-
-
Field Summary
Fields Modifier and Type Field Description protected @NonNull com.google.common.cache.LoadingCache<String,org.apache.avro.io.DatumReader<Object>>datumReaderCache
-
Constructor Summary
Constructors Constructor Description AvroDeserializer(GlueSchemaRegistryConfiguration configs)Constructor accepting various dependencies.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectdeserialize(@NonNull ByteBuffer buffer, Schema schemaObject)Deserialize the bytes to the original Avro message given the schema retrieved from the schema registry.
-
-
-
Constructor Detail
-
AvroDeserializer
public AvroDeserializer(GlueSchemaRegistryConfiguration configs)
Constructor accepting various dependencies.- Parameters:
configs- configuration elements
-
-
Method Detail
-
deserialize
public Object deserialize(@NonNull @NonNull ByteBuffer buffer, @NonNull Schema schemaObject)
Deserialize the bytes to the original Avro message given the schema retrieved from the schema registry.- Specified by:
deserializein interfaceGlueSchemaRegistryDataFormatDeserializer- Parameters:
buffer- data to be de-serializedschemaObject- Avro schema- Returns:
- de-serialized object
- Throws:
AWSSchemaRegistryException- Exception during de-serialization
-
-