Skip to content

Commit

Permalink
map not properties
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-rcheng committed Nov 20, 2023
1 parent 0ce288a commit 7628b75
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -65,7 +63,7 @@ public static StreamingClientProvider getStreamingClientProviderForTests(

/** ONLY FOR TESTING - private constructor to inject properties for testing */
private StreamingClientProvider(
LoadingCache<Properties, SnowflakeStreamingIngestClient> registeredClients,
LoadingCache<Map<String, String>, SnowflakeStreamingIngestClient> registeredClients,
StreamingClientHandler streamingClientHandler) {
this();
this.registeredClients = registeredClients;
Expand All @@ -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<Properties, SnowflakeStreamingIngestClient> registeredClients;
private LoadingCache<Map<String, String>, SnowflakeStreamingIngestClient> registeredClients;

// private constructor for singleton
private StreamingClientProvider() {
Expand All @@ -94,7 +92,7 @@ private StreamingClientProvider() {
client.getName(),
removalCause.toString());
})
.build();
.build(this.streamingClientHandler::createClient);
}

/**
Expand Down

0 comments on commit 7628b75

Please sign in to comment.