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,org.apache.flink.api.common.serialization.SerializationSchema<T>
public class ConfluentRegistryAvroSerializationSchema<T> extends org.apache.flink.formats.avro.RegistryAvroSerializationSchema<T>Serialization schema that serializes to Avro binary format that uses Confluent Schema Registry.- See Also:
- Serialized Form
-
-
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)CreatesAvroSerializationSchemathat 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)CreatesAvroSerializationSchemathat 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)CreatesAvroSerializationSchemathat 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)CreatesAvroSerializationSchemathat 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
-
-
-
-
Method Detail
-
forSpecific
public static <T extends org.apache.avro.specific.SpecificRecord> ConfluentRegistryAvroSerializationSchema<T> forSpecific(Class<T> tClass, String subject, String schemaRegistryUrl)
CreatesAvroSerializationSchemathat 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)
CreatesAvroSerializationSchemathat 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)
CreatesAvroSerializationSchemathat 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)
CreatesAvroSerializationSchemathat 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
-
-