Class ClassLoaderSafeSchemaRegistryClient
- java.lang.Object
-
- io.trino.plugin.kafka.schema.confluent.ClassLoaderSafeSchemaRegistryClient
-
- All Implemented Interfaces:
io.confluent.kafka.schemaregistry.client.SchemaRegistryClient,io.confluent.kafka.schemaregistry.client.SchemaVersionFetcher
public class ClassLoaderSafeSchemaRegistryClient extends Object implements io.confluent.kafka.schemaregistry.client.SchemaRegistryClient
-
-
Constructor Summary
Constructors Constructor Description ClassLoaderSafeSchemaRegistryClient(io.confluent.kafka.schemaregistry.client.SchemaRegistryClient delegate, ClassLoader classLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegerdeleteSchemaVersion(String subject, String version)IntegerdeleteSchemaVersion(Map<String,String> requestProperties, String subject, String version)List<Integer>deleteSubject(String subject)List<Integer>deleteSubject(Map<String,String> requestProperties, String subject)Collection<String>getAllSubjects()Collection<String>getAllSubjectsById(int id)List<Integer>getAllVersions(String subject)Collection<io.confluent.kafka.schemaregistry.client.rest.entities.SubjectVersion>getAllVersionsById(int id)org.apache.avro.SchemagetById(int id)org.apache.avro.SchemagetByID(int id)org.apache.avro.SchemagetBySubjectAndId(String subject, int id)org.apache.avro.SchemagetBySubjectAndID(String subject, int id)io.confluent.kafka.schemaregistry.client.rest.entities.SchemagetByVersion(String subject, int version, boolean lookupDeletedSchema)StringgetCompatibility(String subject)intgetId(String subject, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema)intgetId(String subject, org.apache.avro.Schema schema)io.confluent.kafka.schemaregistry.client.SchemaMetadatagetLatestSchemaMetadata(String subject)StringgetMode()StringgetMode(String subject)io.confluent.kafka.schemaregistry.ParsedSchemagetSchemaById(int id)io.confluent.kafka.schemaregistry.ParsedSchemagetSchemaBySubjectAndId(String subject, int id)io.confluent.kafka.schemaregistry.client.SchemaMetadatagetSchemaMetadata(String subject, int version)intgetVersion(String subject, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema)intgetVersion(String subject, org.apache.avro.Schema schema)Optional<io.confluent.kafka.schemaregistry.ParsedSchema>parseSchema(String schemaType, String schemaString, List<io.confluent.kafka.schemaregistry.client.rest.entities.SchemaReference> references)intregister(String subject, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema)intregister(String subject, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema, int version, int id)intregister(String subject, org.apache.avro.Schema schema)intregister(String subject, org.apache.avro.Schema schema, int version, int id)voidreset()StringsetMode(String mode)StringsetMode(String mode, String subject)booleantestCompatibility(String subject, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema)booleantestCompatibility(String subject, org.apache.avro.Schema schema)StringupdateCompatibility(String subject, String compatibility)
-
-
-
Constructor Detail
-
ClassLoaderSafeSchemaRegistryClient
public ClassLoaderSafeSchemaRegistryClient(io.confluent.kafka.schemaregistry.client.SchemaRegistryClient delegate, ClassLoader classLoader)
-
-
Method Detail
-
parseSchema
public Optional<io.confluent.kafka.schemaregistry.ParsedSchema> parseSchema(String schemaType, String schemaString, List<io.confluent.kafka.schemaregistry.client.rest.entities.SchemaReference> references)
- Specified by:
parseSchemain interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient
-
register
public int register(String subject, org.apache.avro.Schema schema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
registerin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
register
public int register(String subject, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
registerin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
register
public int register(String subject, org.apache.avro.Schema schema, int version, int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
registerin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
register
public int register(String subject, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema, int version, int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
registerin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getByID
public org.apache.avro.Schema getByID(int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException- Specified by:
getByIDin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getById
public org.apache.avro.Schema getById(int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException- Specified by:
getByIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getSchemaById
public io.confluent.kafka.schemaregistry.ParsedSchema getSchemaById(int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException- Specified by:
getSchemaByIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getBySubjectAndID
public org.apache.avro.Schema getBySubjectAndID(String subject, int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getBySubjectAndIDin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getBySubjectAndId
public org.apache.avro.Schema getBySubjectAndId(String subject, int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getBySubjectAndIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getSchemaBySubjectAndId
public io.confluent.kafka.schemaregistry.ParsedSchema getSchemaBySubjectAndId(String subject, int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getSchemaBySubjectAndIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getAllSubjectsById
public Collection<String> getAllSubjectsById(int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getAllSubjectsByIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getAllVersionsById
public Collection<io.confluent.kafka.schemaregistry.client.rest.entities.SubjectVersion> getAllVersionsById(int id) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getAllVersionsByIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getByVersion
public io.confluent.kafka.schemaregistry.client.rest.entities.Schema getByVersion(String subject, int version, boolean lookupDeletedSchema)
- Specified by:
getByVersionin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Specified by:
getByVersionin interfaceio.confluent.kafka.schemaregistry.client.SchemaVersionFetcher
-
getLatestSchemaMetadata
public io.confluent.kafka.schemaregistry.client.SchemaMetadata getLatestSchemaMetadata(String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getLatestSchemaMetadatain interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getSchemaMetadata
public io.confluent.kafka.schemaregistry.client.SchemaMetadata getSchemaMetadata(String subject, int version) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getSchemaMetadatain interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getVersion
public int getVersion(String subject, org.apache.avro.Schema schema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getVersionin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getVersion
public int getVersion(String subject, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getVersionin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getAllVersions
public List<Integer> getAllVersions(String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getAllVersionsin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
testCompatibility
public boolean testCompatibility(String subject, org.apache.avro.Schema schema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
testCompatibilityin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
testCompatibility
public boolean testCompatibility(String subject, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
testCompatibilityin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
updateCompatibility
public String updateCompatibility(String subject, String compatibility) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
updateCompatibilityin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getCompatibility
public String getCompatibility(String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getCompatibilityin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
setMode
public String setMode(String mode) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
setModein interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
setMode
public String setMode(String mode, String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
setModein interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getMode
public String getMode() throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getModein interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getMode
public String getMode(String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getModein interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getAllSubjects
public Collection<String> getAllSubjects() throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getAllSubjectsin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getId
public int getId(String subject, org.apache.avro.Schema schema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
getId
public int getId(String subject, io.confluent.kafka.schemaregistry.ParsedSchema parsedSchema) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
getIdin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
deleteSubject
public List<Integer> deleteSubject(String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
deleteSubjectin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
deleteSubject
public List<Integer> deleteSubject(Map<String,String> requestProperties, String subject) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
deleteSubjectin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
deleteSchemaVersion
public Integer deleteSchemaVersion(String subject, String version) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
deleteSchemaVersionin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
deleteSchemaVersion
public Integer deleteSchemaVersion(Map<String,String> requestProperties, String subject, String version) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
- Specified by:
deleteSchemaVersionin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient- Throws:
IOExceptionio.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
-
reset
public void reset()
- Specified by:
resetin interfaceio.confluent.kafka.schemaregistry.client.SchemaRegistryClient
-
-