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();