public class AWSAvroDeserializer extends Object implements AWSDataFormatDeserializer
| Constructor and Description |
|---|
AWSAvroDeserializer(GlueSchemaRegistryConfiguration configs)
Constructor accepting various dependencies.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.avro.io.DatumReader<Object> |
createDatumReader(org.apache.avro.Schema writerSchema,
UUID schemaVersionId)
This method is used to create Avro datum reader for deserialization.
|
Object |
deserialize(byte[] data,
String schema)
Deserialize the bytes to the original Avro message for the supplied schema.
|
Object |
deserialize(ByteBuffer buffer,
String schema)
Deserialize the bytes to the original Avro message for the supplied schema.
|
Object |
deserialize(UUID schemaVersionId,
ByteBuffer buffer,
String schema)
Deserialize the bytes to the original Avro message given the schema retrieved
from the schema registry.
|
byte[] |
getDeserializedData(ByteBuffer buffer) |
public AWSAvroDeserializer(GlueSchemaRegistryConfiguration configs)
configs - configuration elementspublic Object deserialize(@NonNull byte[] data, @NonNull String schema)
deserialize in interface AWSDataFormatDeserializerdata - data to be de-serializedschema - Avro schemaAWSSchemaRegistryException - Exception during de-serializationpublic Object deserialize(@NonNull ByteBuffer buffer, @NonNull String schema)
deserialize in interface AWSDataFormatDeserializerbuffer - data to be de-serializedschema - Avro schemaAWSSchemaRegistryException - Exception during de-serializationpublic Object deserialize(@NonNull UUID schemaVersionId, @NonNull ByteBuffer buffer, @NonNull String schema)
deserialize in interface AWSDataFormatDeserializerschemaVersionId - schema version id for the Avro writer schemabuffer - data to be de-serializedschema - Avro schemaAWSSchemaRegistryException - Exception during de-serializationpublic byte[] getDeserializedData(ByteBuffer buffer) throws IOException
IOExceptionpublic org.apache.avro.io.DatumReader<Object> createDatumReader(org.apache.avro.Schema writerSchema, UUID schemaVersionId) throws InstantiationException, IllegalAccessException
writerSchema - schema that writes the Avro messageschemaVersionId - schema version id for the Avro writer schemaInstantiationException - can be thrown for readerClass.newInstance()
from java.lang.Class implementationIllegalAccessException - can be thrown readerClass.newInstance() from
java.lang.Class implementationCopyright © 2019 Amazon Web Services, Inc. All Rights Reserved.