twalthr commented on a change in pull request #15808:
URL: https://github.com/apache/flink/pull/15808#discussion_r645508343
##########
File path:
flink-formats/flink-avro-confluent-registry/src/main/java/org/apache/flink/formats/avro/registry/confluent/RegistryAvroFormatFactory.java
##########
@@ -136,6 +160,31 @@ public String factoryIdentifier() {
public Set<ConfigOption<?>> optionalOptions() {
Set<ConfigOption<?>> options = new HashSet<>();
options.add(SCHEMA_REGISTRY_SUBJECT);
+ options.add(SCHEMA_REGISTRY_SSL_KEYSTORE_LOCATION);
+ options.add(SCHEMA_REGISTRY_SSL_KEYSTORE_PASSWORD);
+ options.add(SCHEMA_REGISTRY_SSL_TRUSTSTORE_LOCATION);
+ options.add(SCHEMA_REGISTRY_SSL_TRUSTSTORE_PASSWORD);
+ options.add(SCHEMA_REGISTRY_BASIC_AUTH_CREDENTIALS_SOURCE);
+ options.add(SCHEMA_REGISTRY_BASIC_AUTH_USER_INFO);
return options;
}
+
+ private Map<String, ?> buildOptionalPropertiesMap(ReadableConfig
formatOptions) {
+ Map<String, String> optionalPropertiesMap = new HashMap<>();
+
+ List<ConfigOption<String>> configOptions = new ArrayList<>();
+ configOptions.add(SCHEMA_REGISTRY_SSL_KEYSTORE_LOCATION);
+ configOptions.add(SCHEMA_REGISTRY_SSL_KEYSTORE_PASSWORD);
+ configOptions.add(SCHEMA_REGISTRY_SSL_TRUSTSTORE_LOCATION);
+ configOptions.add(SCHEMA_REGISTRY_SSL_TRUSTSTORE_PASSWORD);
+ configOptions.add(SCHEMA_REGISTRY_BASIC_AUTH_CREDENTIALS_SOURCE);
+ configOptions.add(SCHEMA_REGISTRY_BASIC_AUTH_USER_INFO);
Review comment:
You are right, this is a shortcoming in the current FormatFactory
design. In dynamic table factories you have access to the plain `Map<String,
String>` for excluding prefixes but not in format factories. We should fix this
in a follow up issue. I will create a JIRA ticket for it.
Until then let's do hard coded properties but already in prefixed format.
Then we can replace those explicit options with wildcard options in the future.
--
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]