From 7628b75856216ae79ad0d10249b0dceaa3769d85 Mon Sep 17 00:00:00 2001 From: revi cheng Date: Mon, 20 Nov 2023 13:29:16 -0800 Subject: [PATCH] map not properties --- .../internal/streaming/StreamingClientProvider.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingClientProvider.java b/src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingClientProvider.java index 2adb99858..b2f834773 100644 --- a/src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingClientProvider.java +++ b/src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingClientProvider.java @@ -23,8 +23,6 @@ import com.snowflake.kafka.connector.SnowflakeSinkConnectorConfig; import com.snowflake.kafka.connector.internal.KCLogger; import java.util.Map; -import java.util.Properties; - import net.snowflake.ingest.internal.com.github.benmanes.caffeine.cache.Caffeine; import net.snowflake.ingest.internal.com.github.benmanes.caffeine.cache.LoadingCache; import net.snowflake.ingest.internal.com.github.benmanes.caffeine.cache.RemovalCause; @@ -65,7 +63,7 @@ public static StreamingClientProvider getStreamingClientProviderForTests( /** ONLY FOR TESTING - private constructor to inject properties for testing */ private StreamingClientProvider( - LoadingCache registeredClients, + LoadingCache, SnowflakeStreamingIngestClient> registeredClients, StreamingClientHandler streamingClientHandler) { this(); this.registeredClients = registeredClients; @@ -77,7 +75,7 @@ private StreamingClientProvider( // if the one client optimization is enabled, we cache the created clients based on corresponding // Streaming properties - private LoadingCache registeredClients; + private LoadingCache, SnowflakeStreamingIngestClient> registeredClients; // private constructor for singleton private StreamingClientProvider() { @@ -94,7 +92,7 @@ private StreamingClientProvider() { client.getName(), removalCause.toString()); }) - .build(); + .build(this.streamingClientHandler::createClient); } /**