code: private void executeShowKeySpaces() throws TException, InvalidRequestException
      {
          if (!CliMain.isConnected())
              return;
  
          printCQL3TablesWarning("show keyspaces");
  
          List<KsDef> keySpaces = thriftClient.describe_keyspaces();
  
          Collections.sort(keySpaces, new KsDefNamesComparator());
          for (KsDef keySpace : keySpaces)
          {
              describeKeySpace(keySpace.name, keySpace);
          }
      }
docs: SHOW KEYSPACES