private void initDB() {
cluster = Cluster.builder()
.addContactPoint("localhost")
// .withSSL() // Uncomment if using client to node encryption
.build();
Metadata metadata = cluster.getMetadata();
System.out.printf("Connected to cluster: %s\n", metadata.getClusterName());
for (Host host : metadata.getAllHosts()) {
System.out.printf("Datacenter: %s; Host: %s; Rack: %s\n",
host.getDatacenter(), host.getAddress(), host.getRack());
}
session = cluster.connect();
session.execute("CREATE KEYSPACE IF NOT EXISTS test WITH replication "