From 6b46758efe7b9060118cfb26bcabfc3bccf8bb77 Mon Sep 17 00:00:00 2001 From: Parag Badani Date: Fri, 31 Jan 2025 15:26:45 +0530 Subject: [PATCH] KSQL-12955 | Address review comments. --- .../registry/KsqlSchemaRegistryClientFactory.java | 1 - .../io/confluent/ksql/rest/server/KsqlRestConfig.java | 11 ++++++----- .../ksql/rest/server/KsqlRestConfigTest.java | 2 +- .../ksql/rest/server/KsqlServerMainTest.java | 1 - 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ksqldb-engine/src/main/java/io/confluent/ksql/schema/registry/KsqlSchemaRegistryClientFactory.java b/ksqldb-engine/src/main/java/io/confluent/ksql/schema/registry/KsqlSchemaRegistryClientFactory.java index 4aa8e1063ab..49e8481320b 100644 --- a/ksqldb-engine/src/main/java/io/confluent/ksql/schema/registry/KsqlSchemaRegistryClientFactory.java +++ b/ksqldb-engine/src/main/java/io/confluent/ksql/schema/registry/KsqlSchemaRegistryClientFactory.java @@ -29,7 +29,6 @@ import java.util.Map; import java.util.function.Supplier; import javax.net.ssl.SSLContext; -import org.apache.kafka.common.config.internals.ConfluentConfigs; import org.apache.kafka.common.security.auth.SslEngineFactory; import org.apache.kafka.common.security.ssl.DefaultSslEngineFactory; import org.apache.kafka.common.utils.SecurityUtils; diff --git a/ksqldb-rest-app/src/main/java/io/confluent/ksql/rest/server/KsqlRestConfig.java b/ksqldb-rest-app/src/main/java/io/confluent/ksql/rest/server/KsqlRestConfig.java index e6daa4815b6..6ba583eacdf 100644 --- a/ksqldb-rest-app/src/main/java/io/confluent/ksql/rest/server/KsqlRestConfig.java +++ b/ksqldb-rest-app/src/main/java/io/confluent/ksql/rest/server/KsqlRestConfig.java @@ -445,11 +445,12 @@ public class KsqlRestConfig extends AbstractConfig { KSQL_COMMAND_TOPIC_MIGRATION_MIGRATING ); - public static final String KSQL_RESOURCE_EXTENSION = + public static final String KSQL_RESOURCE_EXTENSIONS = "ksql.resource.extension.class"; private static final String KSQL_RESOURCE_EXTENSION_DEFAULT = ""; private static final String KSQL_RESOURCE_EXTENSION_DOC = - "A list of KsqlResourceExtension implementations to register with ksqlDB server."; + "A list of KsqlResourceExtension implementations " + + "to be registered with the ksqlDB server."; private static final ConfigDef CONFIG_DEF; @@ -625,7 +626,7 @@ public class KsqlRestConfig extends AbstractConfig { Importance.HIGH, INTERNAL_LISTENER_DOC ).define( - KSQL_RESOURCE_EXTENSION, + KSQL_RESOURCE_EXTENSIONS, Type.LIST, KSQL_RESOURCE_EXTENSION_DEFAULT, Importance.MEDIUM, @@ -1079,10 +1080,10 @@ public ClientAuth getClientAuthInternal() { } public List getKsqlResourceExtensions() { - if (getString(KSQL_RESOURCE_EXTENSION).isEmpty()) { + if (getString(KSQL_RESOURCE_EXTENSIONS).isEmpty()) { return Collections.emptyList(); } - return getConfiguredInstances(KSQL_RESOURCE_EXTENSION, KsqlResourceExtension.class); + return getConfiguredInstances(KSQL_RESOURCE_EXTENSIONS, KsqlResourceExtension.class); } /** diff --git a/ksqldb-rest-app/src/test/java/io/confluent/ksql/rest/server/KsqlRestConfigTest.java b/ksqldb-rest-app/src/test/java/io/confluent/ksql/rest/server/KsqlRestConfigTest.java index 85a3a8741fa..474f665345c 100644 --- a/ksqldb-rest-app/src/test/java/io/confluent/ksql/rest/server/KsqlRestConfigTest.java +++ b/ksqldb-rest-app/src/test/java/io/confluent/ksql/rest/server/KsqlRestConfigTest.java @@ -104,7 +104,7 @@ public void shouldGetConfiguredKsqlResourceExtensions() { .putAll(MIN_VALID_CONFIGS) .put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest") .put(KsqlConfig.KSQL_SERVICE_ID_CONFIG, "test") - .put(KsqlRestConfig.KSQL_RESOURCE_EXTENSION, + .put(KsqlRestConfig.KSQL_RESOURCE_EXTENSIONS, "io.confluent.ksql.rest.server.extensions.DummyResourceExtension") .build() ); diff --git a/ksqldb-rest-app/src/test/java/io/confluent/ksql/rest/server/KsqlServerMainTest.java b/ksqldb-rest-app/src/test/java/io/confluent/ksql/rest/server/KsqlServerMainTest.java index e74509bfbb3..512aead136c 100644 --- a/ksqldb-rest-app/src/test/java/io/confluent/ksql/rest/server/KsqlServerMainTest.java +++ b/ksqldb-rest-app/src/test/java/io/confluent/ksql/rest/server/KsqlServerMainTest.java @@ -37,7 +37,6 @@ import java.util.Map; import java.util.concurrent.Executor; import org.apache.kafka.clients.CommonClientConfigs; -import org.apache.kafka.common.config.internals.ConfluentConfigs; import org.apache.kafka.common.security.auth.SecurityProtocol; import org.easymock.Capture; import org.easymock.EasyMockRunner;