T
- the type to be serializedpublic class GlueSchemaRegistryAvroSerializationSchema<T> extends RegistryAvroSerializationSchema<T>
SerializationSchema.InitializationContext
schemaCoder
Modifier | Constructor and Description |
---|---|
protected |
GlueSchemaRegistryAvroSerializationSchema(Class<T> recordClazz,
org.apache.avro.Schema reader,
SchemaCoder schemaCoder) |
Modifier and Type | Method and Description |
---|---|
static GlueSchemaRegistryAvroSerializationSchema<org.apache.avro.generic.GenericRecord> |
forGeneric(org.apache.avro.Schema schema,
String transportName,
Map<String,Object> configs)
Creates
GlueSchemaRegistryAvroSerializationSchema that serializes GenericRecord using provided schema. |
static <T extends org.apache.avro.specific.SpecificRecord> |
forSpecific(Class<T> clazz,
String transportName,
Map<String,Object> configs)
Creates
GlueSchemaRegistryAvroSerializationSchema that serializes SpecificRecord using provided schema. |
byte[] |
serialize(T object)
Serializes the incoming element to a byte array containing bytes of AWS Glue Schema registry
information.
|
checkAvroInitialized, equals, forGeneric, forSpecific, hashCode
forGeneric, forSpecific, getDatumWriter, getEncoder, getOutputStream, getSchema
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
open
@VisibleForTesting protected GlueSchemaRegistryAvroSerializationSchema(Class<T> recordClazz, @Nullable org.apache.avro.Schema reader, SchemaCoder schemaCoder)
public static GlueSchemaRegistryAvroSerializationSchema<org.apache.avro.generic.GenericRecord> forGeneric(org.apache.avro.Schema schema, String transportName, Map<String,Object> configs)
GlueSchemaRegistryAvroSerializationSchema
that serializes GenericRecord
using provided schema.schema
- the schema that will be used for serializationtransportName
- topic name or stream name etc.configs
- configuration map of AWS Glue Schema Registrypublic static <T extends org.apache.avro.specific.SpecificRecord> GlueSchemaRegistryAvroSerializationSchema<T> forSpecific(Class<T> clazz, String transportName, Map<String,Object> configs)
GlueSchemaRegistryAvroSerializationSchema
that serializes SpecificRecord
using provided schema.clazz
- the type to be serializedtransportName
- topic name or stream name etc.configs
- configuration map of Amazon Schema Registrypublic byte[] serialize(T object)
serialize
in interface SerializationSchema<T>
serialize
in class RegistryAvroSerializationSchema<T>
object
- The incoming element to be serializedCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.