public Collection < String > getKeyspaces ( DBConn dbConn ) { List < String > result = new ArrayList <> ( ) ; try { for ( KsDef ksDef : dbConn . getClientSession ( ) . describe_keyspaces ( ) ) { result . add ( ksDef . getName ( ) ) ; } } catch ( Exception e ) { String errMsg = "Failed to get keyspace description" ; m_logger . error ( errMsg , e ) ; throw new RuntimeException ( errMsg , e ) ; } return result ; }
Get a list of all known keyspaces . This method can be used with any DB connection .