break;
}
}
if(!exists) {
KeyspaceDefinition def = cluster.makeKeyspaceDefinition();
def.setName(keyspaceName);
def.setStrategyClass("org.apache.cassandra.locator.SimpleStrategy");
Map<String, String> map = new HashMap<String, String>();
map.put("replication_factor", "3");
def.setStrategyOptions(map);
cluster.addKeyspace(def);
}
context = builder.buildKeyspace(ThriftFamilyFactory.getInstance());
context.start();
keyspace = context.getEntity();
KeyspaceDefinition keySpaceMeta = keyspace.describeKeyspace();
findExistingColumnFamilies(keySpaceMeta);
log.info("On keyspace="+keyspace.getKeyspaceName()+"Existing column families="+cfNameToCassandra.keySet()+"\nNOTE: WE WILL CREATE " +
"new column families automatically as you save entites that have no column family");
}