public class AWSDeserializer extends Object implements Closeable
| Constructor and Description |
|---|
AWSDeserializer(GlueSchemaRegistryConfiguration configuration,
software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider) |
AWSDeserializer(Map<String,?> configs,
Properties properties,
software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialProvider,
AWSSchemaRegistryClient schemaRegistryClient)
Constructor accepting various dependencies.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDeserialize(byte[] data)
Returns if the given data array can be deserialized.
|
void |
close()
Resource clean up for Closeable.
|
Object |
deserialize(AWSDeserializerInput deserializerInput)
De-serializes the given data and returns an Object.
|
byte[] |
getActualData(byte[] data) |
byte[] |
getAvroDeserializedData(ByteBuffer buffer)
Get the byte array of Avro object to be de-serialized
|
Schema |
getSchema(byte[] data) |
String |
getSchemaDefinition(byte[] data)
Fetches the schema definition for a the serialized data.
|
String |
getSchemaDefinition(ByteBuffer buffer)
Fetches the schema definition for the serialized data.
|
public AWSDeserializer(Map<String,?> configs, Properties properties, @NonNull software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialProvider, AWSSchemaRegistryClient schemaRegistryClient)
configs - configuration mapproperties - configuration propertiescredentialProvider - credentials provider for integrating with schema
registry serviceschemaRegistryClient - schema registry client for communicating with
schema registry servicepublic AWSDeserializer(@NonNull
GlueSchemaRegistryConfiguration configuration,
@NonNull
software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider)
public String getSchemaDefinition(@NonNull ByteBuffer buffer)
buffer - data for which schema definition is needed as ByteBufferAWSIncompatibleDataException - when data is incompatible with schema
registrypublic byte[] getActualData(byte[] data)
public Schema getSchema(@NonNull byte[] data)
public String getSchemaDefinition(@NonNull byte[] data)
data - data for which schema definition is needed as byte arrayAWSIncompatibleDataException - when data is incompatible with schema
registrypublic Object deserialize(@NonNull AWSDeserializerInput deserializerInput) throws AWSSchemaRegistryException
deserializerInput - Input data object for deserializerAWSSchemaRegistryException - Exception during de-serializationpublic boolean canDeserialize(byte[] data)
data - byte[] of data.public byte[] getAvroDeserializedData(@NonNull
ByteBuffer buffer)
throws IOException
buffer - byte buffer to be de-serializedIOException - Exception during decompressionpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2019 Amazon Web Services, Inc. All Rights Reserved.