qingdao81 commented on a change in pull request #15808:
URL: https://github.com/apache/flink/pull/15808#discussion_r645332973



##########
File path: 
flink-formats/flink-avro-confluent-registry/src/main/java/org/apache/flink/formats/avro/registry/confluent/CachedSchemaCoderProvider.java
##########
@@ -37,21 +40,36 @@
     private final String subject;
     private final String url;
     private final int identityMapCapacity;
+    private final Map<String, ?> registryConfigs;
 
     CachedSchemaCoderProvider(String url, int identityMapCapacity) {
-        this(null, url, identityMapCapacity);
+        this(null, url, identityMapCapacity, null);
     }
 
-    CachedSchemaCoderProvider(@Nullable String subject, String url, int 
identityMapCapacity) {
+    CachedSchemaCoderProvider(
+            @Nullable String subject,
+            String url,
+            int identityMapCapacity,
+            @Nullable Map<String, ?> registryConfigs) {
         this.subject = subject;
         this.url = Objects.requireNonNull(url);
         this.identityMapCapacity = identityMapCapacity;
+        this.registryConfigs = registryConfigs;
     }
 
     @Override
     public SchemaCoder get() {
         return new ConfluentSchemaRegistryCoder(
-                this.subject, new CachedSchemaRegistryClient(url, 
identityMapCapacity));
+                this.subject, createRegistryClient(registryConfigs));
+    }
+
+    private SchemaRegistryClient createRegistryClient(Map<String, ?> 
registryConfigs) {
+        if (registryConfigs == null) {
+            return new CachedSchemaRegistryClient(url, identityMapCapacity);
+        }
+        RestService restService = new RestService(url);
+        restService.configure(registryConfigs);

Review comment:
       Yes indeed - good point I will revert this change. Thanks!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to