} catch (SQLException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
} else {
CassandraStorage cassStorage = new CassandraStorage(storageConf);
if (clientType.equals(CLIENTTYPE.ASTYANAX.getType())) {
return new AstyanaxCassandraConnection(cassStorage.getCluster(), db, hs);
} else {
Cluster cluster = Cluster.builder().withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy())).addContactPoint(cassStorage.getCluster()).build();
return new CassandraConnection(cluster);
}
}
}