From 09b896dc57cbab5ea35bdf265d812ef6c2024035 Mon Sep 17 00:00:00 2001 From: wilkysingh-tarento <97211740+wilkysingh-tarento@users.noreply.github.com> Date: Thu, 19 Jan 2023 18:19:31 +0530 Subject: [PATCH] cb-ext frequent pod crash issue due to contact point (#168) * cb-ext frequent pod crash issue due to contact point * else part removed for multiple contact points fixes --- .../helper/cassandra/CassandraConnectionManagerImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/sunbird/common/helper/cassandra/CassandraConnectionManagerImpl.java b/src/main/java/org/sunbird/common/helper/cassandra/CassandraConnectionManagerImpl.java index b8712a0c4..7c93d1824 100644 --- a/src/main/java/org/sunbird/common/helper/cassandra/CassandraConnectionManagerImpl.java +++ b/src/main/java/org/sunbird/common/helper/cassandra/CassandraConnectionManagerImpl.java @@ -66,7 +66,10 @@ private void createCassandraConnection() { poolingOptions.setPoolTimeoutMillis( Integer.parseInt(cache.getProperty(Constants.POOL_TIMEOUT))); String cassandraHost = (cache.getProperty(Constants.CASSANDRA_CONFIG_HOST)); - String[] hosts = new String[]{cassandraHost}; + String[] hosts = null; + if (StringUtils.isNotBlank(cassandraHost)) { + hosts = cassandraHost.split(","); + } cluster = createCluster(hosts, poolingOptions); final Metadata metadata = cluster.getMetadata();