in resume-api/resume-api-cassandraql/src/main/java/org/apache/camel/example/resume/cassandra/main/ExampleDao.java [48:66]
public void createKeySpace() {
Map<String, Object> replication = new HashMap<>();
replication.put("class", "SimpleStrategy");
replication.put("replication_factor", 3);
String statement = SchemaBuilder.createKeyspace(KEY_SPACE)
.ifNotExists()
.withReplicationOptions(replication)
.asCql();
LOG.info("Executing {}", statement);
ResultSet rs = session.execute(statement);
if (!rs.wasApplied()) {
LOG.warn("The create key space statement did not execute");
}
}