Class ConfluentRegistryAvroSerializationSchema<T>
- java.lang.Object
-
- org.apache.flink.formats.avro.AvroSerializationSchema<T>
-
- org.apache.flink.formats.avro.RegistryAvroSerializationSchema<T>
-
- org.apache.flink.formats.avro.registry.confluent.ConfluentRegistryAvroSerializationSchema<T>
-
- Type Parameters:
T
- the type to be serialized
- All Implemented Interfaces:
Serializable
,SerializationSchema<T>
public class ConfluentRegistryAvroSerializationSchema<T> extends RegistryAvroSerializationSchema<T>
Serialization schema that serializes to Avro binary format that uses Confluent Schema Registry.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.api.common.serialization.SerializationSchema
SerializationSchema.InitializationContext
-
-
Field Summary
-
Fields inherited from class org.apache.flink.formats.avro.RegistryAvroSerializationSchema
schemaCoder
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConfluentRegistryAvroSerializationSchema<org.apache.avro.generic.GenericRecord>
forGeneric(String subject, org.apache.avro.Schema schema, String schemaRegistryUrl)
CreatesAvroSerializationSchema
that produces byte arrays that were generated from Avro schema and writes the writer schema to Confluent Schema Registry.static ConfluentRegistryAvroSerializationSchema<org.apache.avro.generic.GenericRecord>
forGeneric(String subject, org.apache.avro.Schema schema, String schemaRegistryUrl, Map<String,?> registryConfigs)
CreatesAvroSerializationSchema
that produces byte arrays that were generated from Avro schema and writes the writer schema to Confluent Schema Registry.static <T extends org.apache.avro.specific.SpecificRecord>
ConfluentRegistryAvroSerializationSchema<T>forSpecific(Class<T> tClass, String subject, String schemaRegistryUrl)
CreatesAvroSerializationSchema
that produces byte arrays that were generated from Avro schema and writes the writer schema to Confluent Schema Registry.static <T extends org.apache.avro.specific.SpecificRecord>
ConfluentRegistryAvroSerializationSchema<T>forSpecific(Class<T> tClass, String subject, String schemaRegistryUrl, Map<String,?> registryConfigs)
CreatesAvroSerializationSchema
that produces byte arrays that were generated from Avro schema and writes the writer schema to Confluent Schema Registry.-
Methods inherited from class org.apache.flink.formats.avro.RegistryAvroSerializationSchema
checkAvroInitialized, equals, forGeneric, forGeneric, forSpecific, forSpecific, hashCode, serialize
-
Methods inherited from class org.apache.flink.formats.avro.AvroSerializationSchema
forGeneric, forGeneric, forSpecific, forSpecific, getDatumWriter, getEncoder, getOutputStream, getSchema, open
-
-
-
-
Method Detail
-
forSpecific
public static <T extends org.apache.avro.specific.SpecificRecord> ConfluentRegistryAvroSerializationSchema<T> forSpecific(Class<T> tClass, String subject, String schemaRegistryUrl)
CreatesAvroSerializationSchema
that produces byte arrays that were generated from Avro schema and writes the writer schema to Confluent Schema Registry.- Parameters:
tClass
- the type to be serializedsubject
- subject of schema registry to produceschemaRegistryUrl
- URL of schema registry to connect- Returns:
- serialized record
-
forSpecific
public static <T extends org.apache.avro.specific.SpecificRecord> ConfluentRegistryAvroSerializationSchema<T> forSpecific(Class<T> tClass, String subject, String schemaRegistryUrl, @Nullable Map<String,?> registryConfigs)
CreatesAvroSerializationSchema
that produces byte arrays that were generated from Avro schema and writes the writer schema to Confluent Schema Registry.- Parameters:
tClass
- the type to be serializedsubject
- subject of schema registry to produceschemaRegistryUrl
- URL of schema registry to connectregistryConfigs
- map with additional schema registry configs (for example SSL properties)- Returns:
- serialized record
-
forGeneric
public static ConfluentRegistryAvroSerializationSchema<org.apache.avro.generic.GenericRecord> forGeneric(String subject, org.apache.avro.Schema schema, String schemaRegistryUrl)
CreatesAvroSerializationSchema
that produces byte arrays that were generated from Avro schema and writes the writer schema to Confluent Schema Registry.- Parameters:
subject
- subject of schema registry to produceschema
- schema that will be used for serializationschemaRegistryUrl
- URL of schema registry to connect- Returns:
- serialized record
-
forGeneric
public static ConfluentRegistryAvroSerializationSchema<org.apache.avro.generic.GenericRecord> forGeneric(String subject, org.apache.avro.Schema schema, String schemaRegistryUrl, @Nullable Map<String,?> registryConfigs)
CreatesAvroSerializationSchema
that produces byte arrays that were generated from Avro schema and writes the writer schema to Confluent Schema Registry.- Parameters:
subject
- subject of schema registry to produceschema
- schema that will be used for serializationschemaRegistryUrl
- URL of schema registry to connectregistryConfigs
- map with additional schema registry configs (for example SSL properties)- Returns:
- serialized record
-
-