List of usage examples for org.apache.cassandra.db KeyspaceNotDefinedException KeyspaceNotDefinedException
public KeyspaceNotDefinedException(String why)
From source file:org.teiid.resource.adapter.cassandra.CassandraConnectionImpl.java
License:Open Source License
@Override public KeyspaceMetadata keyspaceInfo() throws KeyspaceNotDefinedException { String keyspace = config.getKeyspace(); KeyspaceMetadata result = metadata.getKeyspace(keyspace); if (result == null && keyspace.length() > 2 && keyspace.charAt(0) == '"' && keyspace.charAt(keyspace.length() - 1) == '"') { //try unquoted keyspace = keyspace.substring(1, keyspace.length() - 1); result = metadata.getKeyspace(keyspace); }/*w w w . j av a2 s . c o m*/ if (result == null) { throw new KeyspaceNotDefinedException(keyspace); } return result; }