@PooledConnection public void addKeyspace(String keyspace) throws InvalidRequestException, TException, SchemaDisagreementException { // TODO: Take key space in via JSON/XML. (Replace hard-coded values) List<CfDef> cfDefList = new ArrayList<CfDef>(); KsDef ksDef = new KsDef(keyspace, "org.apache.cassandra.locator.SimpleStrategy", cfDefList); ksDef.putToStrategy_options("replication_factor", "1"); getConnection(null).system_add_keyspace(ksDef); }