code: 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;
      }
docs: Get a list of all known keyspaces. This method can be used with any DB connection.
  
  @param  dbConn   Database connection to use.
  @return          List of all known keyspaces, empty if none.