Class ConfluentSchemaRegistryCoder
- java.lang.Object
-
- org.apache.flink.formats.avro.registry.confluent.ConfluentSchemaRegistryCoder
-
- All Implemented Interfaces:
org.apache.flink.formats.avro.SchemaCoder
public class ConfluentSchemaRegistryCoder extends Object implements org.apache.flink.formats.avro.SchemaCoder
Reads and Writes schema using Confluent Schema Registry protocol.
-
-
Constructor Summary
Constructors Constructor Description ConfluentSchemaRegistryCoder(io.confluent.kafka.schemaregistry.client.SchemaRegistryClient schemaRegistryClient)CreatesSchemaCoderthat uses providedSchemaRegistryClientto connect to schema registry.ConfluentSchemaRegistryCoder(String subject, io.confluent.kafka.schemaregistry.client.SchemaRegistryClient schemaRegistryClient)CreatesSchemaCoderthat uses providedSchemaRegistryClientto connect to schema registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.avro.SchemareadSchema(InputStream in)voidwriteSchema(org.apache.avro.Schema schema, OutputStream out)
-
-
-
Constructor Detail
-
ConfluentSchemaRegistryCoder
public ConfluentSchemaRegistryCoder(String subject, io.confluent.kafka.schemaregistry.client.SchemaRegistryClient schemaRegistryClient)
CreatesSchemaCoderthat uses providedSchemaRegistryClientto connect to schema registry.- Parameters:
schemaRegistryClient- client to connect schema registrysubject- subject of schema registry to produce
-
ConfluentSchemaRegistryCoder
public ConfluentSchemaRegistryCoder(io.confluent.kafka.schemaregistry.client.SchemaRegistryClient schemaRegistryClient)
CreatesSchemaCoderthat uses providedSchemaRegistryClientto connect to schema registry.- Parameters:
schemaRegistryClient- client to connect schema registry
-
-
Method Detail
-
readSchema
public org.apache.avro.Schema readSchema(InputStream in) throws IOException
- Specified by:
readSchemain interfaceorg.apache.flink.formats.avro.SchemaCoder- Throws:
IOException
-
writeSchema
public void writeSchema(org.apache.avro.Schema schema, OutputStream out) throws IOException- Specified by:
writeSchemain interfaceorg.apache.flink.formats.avro.SchemaCoder- Throws:
IOException
-
-