Is there a way to check if an Astyanax Keyspace exists in the current context? Right now my code does the following:
keyspace = context.getClient();
try{
keyspace.describeKeyspace();
}catch (BadRequestException e){
keyspace.createKeyspace(ImmutableMap.<String, Object>builder()
.put("strategy_options", ImmutableMap.<String, Object>builder()
.put("replication_factor", "1")
.build())
.put("strategy_class", "SimpleStrategy")
.build();
}
Is this the only way to check if the keyspace exists?