Skip to content

Commit

Permalink
fix: SandboxedSchemaRegistryClient does not impl. new registerWithRes…
Browse files Browse the repository at this point in the history
…ponse SR API
  • Loading branch information
spena committed Jun 23, 2023
1 parent a7bbc14 commit 877b381
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@
import io.confluent.kafka.schemaregistry.client.SchemaMetadata;
import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient;
import io.confluent.kafka.schemaregistry.client.rest.entities.SchemaReference;
import io.confluent.kafka.schemaregistry.client.rest.entities.requests.RegisterSchemaResponse;
import io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException;
import io.confluent.ksql.util.KsqlConfig;
import io.confluent.ksql.util.KsqlSchemaRegistryNotConfiguredException;

import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -68,6 +72,14 @@ public int register(final String s, final ParsedSchema parsedSchema, final int i
throw configException;
}

@Override
public RegisterSchemaResponse registerWithResponse(
final String subject,
final ParsedSchema schema,
final boolean normalize) throws IOException, RestClientException {
throw configException;
}

@Override
public ParsedSchema getSchemaById(final int i) {
throw configException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import io.confluent.kafka.schemaregistry.client.SchemaMetadata;
import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient;
import io.confluent.kafka.schemaregistry.client.rest.entities.SchemaReference;
import io.confluent.kafka.schemaregistry.client.rest.entities.requests.RegisterSchemaResponse;
import io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException;
import java.io.IOException;
import java.util.Collection;
Expand Down Expand Up @@ -96,6 +97,14 @@ public int register(
return -1; // swallow
}

@Override
public RegisterSchemaResponse registerWithResponse(
final String subject,
final ParsedSchema schema,
final boolean normalize) throws IOException, RestClientException {
return sandboxCacheClient.registerWithResponse(subject, schema, normalize);
}

@Deprecated
@Override
public Schema getById(final int id) {
Expand Down

0 comments on commit 877b381

Please sign in to comment.