Skip to content

Commit 9f9d16b

Browse files
chenjian2664ebyhr
authored andcommitted
Rename AvroConfluentContentSchemaProvider
Rename AvroConfluentContentSchemaProvider to ConfluentContentSchemaProvider
1 parent 2c8015f commit 9f9d16b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
import static java.lang.String.format;
3030
import static java.util.Objects.requireNonNull;
3131

32-
public class AvroConfluentContentSchemaProvider
32+
public class ConfluentContentSchemaProvider
3333
extends AbstractContentSchemaProvider
3434
{
3535
private final SchemaRegistryClient schemaRegistryClient;
3636

3737
@Inject
38-
public AvroConfluentContentSchemaProvider(SchemaRegistryClient schemaRegistryClient)
38+
public ConfluentContentSchemaProvider(SchemaRegistryClient schemaRegistryClient)
3939
{
4040
this.schemaRegistryClient = requireNonNull(schemaRegistryClient, "schemaRegistryClient is null");
4141
}

plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected void setup(Binder binder)
9494
configBinder(binder).bindConfig(ConfluentSchemaRegistryConfig.class);
9595
install(new ConfluentDecoderModule());
9696
install(new ConfluentEncoderModule());
97-
binder.bind(ContentSchemaProvider.class).to(AvroConfluentContentSchemaProvider.class).in(Scopes.SINGLETON);
97+
binder.bind(ContentSchemaProvider.class).to(ConfluentContentSchemaProvider.class).in(Scopes.SINGLETON);
9898
newSetBinder(binder, SchemaRegistryClientPropertiesProvider.class);
9999
newSetBinder(binder, SchemaProvider.class).addBinding().to(AvroSchemaProvider.class).in(Scopes.SINGLETON);
100100
// Each SchemaRegistry object should have a new instance of SchemaProvider
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import static org.assertj.core.api.Assertions.assertThat;
3333
import static org.assertj.core.api.Assertions.assertThatThrownBy;
3434

35-
public class TestAvroConfluentContentSchemaProvider
35+
public class TestConfluentContentSchemaProvider
3636
{
3737
private static final String TOPIC = "test";
3838
private static final String SUBJECT_NAME = format("%s-value", TOPIC);
@@ -44,7 +44,7 @@ public void testAvroConfluentSchemaProvider()
4444
MockSchemaRegistryClient mockSchemaRegistryClient = new MockSchemaRegistryClient();
4545
AvroSchema schema = getAvroSchema();
4646
mockSchemaRegistryClient.register(SUBJECT_NAME, schema);
47-
AvroConfluentContentSchemaProvider avroConfluentSchemaProvider = new AvroConfluentContentSchemaProvider(mockSchemaRegistryClient);
47+
ConfluentContentSchemaProvider avroConfluentSchemaProvider = new ConfluentContentSchemaProvider(mockSchemaRegistryClient);
4848
KafkaTableHandle tableHandle = new KafkaTableHandle("default", TOPIC, TOPIC, AvroRowDecoderFactory.NAME, AvroRowDecoderFactory.NAME, Optional.empty(), Optional.empty(), Optional.empty(), Optional.of(SUBJECT_NAME), ImmutableList.of(), TupleDomain.all());
4949
assertThat(avroConfluentSchemaProvider.getMessage(tableHandle)).isEqualTo(Optional.of(schema).map(AvroSchema::toString));
5050
assertThat(avroConfluentSchemaProvider.getKey(tableHandle)).isEqualTo(Optional.empty());
@@ -64,7 +64,7 @@ public void testAvroSchemaWithReferences()
6464
.orElseThrow();
6565
mockSchemaRegistryClient.register(SUBJECT_NAME, schemaWithReference);
6666

67-
AvroConfluentContentSchemaProvider avroConfluentSchemaProvider = new AvroConfluentContentSchemaProvider(mockSchemaRegistryClient);
67+
ConfluentContentSchemaProvider avroConfluentSchemaProvider = new ConfluentContentSchemaProvider(mockSchemaRegistryClient);
6868
assertThat(avroConfluentSchemaProvider.readSchema(Optional.empty(), Optional.of(SUBJECT_NAME)).map(schema -> new Parser().parse(schema))).isPresent();
6969
}
7070

0 commit comments

Comments
 (0)