src/java/org/apache/cassandra/cli/CliClient.java
/**
     * Add a keyspace
     * @param statement - a token tree representing current statement
     */
Add a keyspace
@param statement - a token tree representing current statement
Add a keyspace @param statement - a token tree representing current statement
private void executeAddKeySpace(Tree statement)
    {
        if (!CliMain.isConnected())
            return;
        String keyspaceName = statement.getChild(0).getText();
        KsDef ksDef = new KsDef(keyspaceName, DEFAULT_PLACEMENT_STRATEGY, new LinkedList<CfDef>());
        try
        {
            String mySchemaVersion = thriftClient.system_add_keyspace(updateKsDefAttributes(statement, ksDef));
            sessionState.out.println(mySchemaVersion);
            validateSchemaIsSettled(mySchemaVersion);
            keyspacesMap.put(keyspaceName, thriftClient.describe_keyspace(keyspaceName));
        }
        catch (InvalidRequestException e)
        {
            throw new RuntimeException(e);
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
        }
    }
private void executeAddKeySpace ( Tree statement ) { if ( ! CliMain . isConnected ( ) ) return ; String keyspaceName = statement . getChild ( 0 ) . getText ( ) ; KsDef ksDef = new KsDef ( keyspaceName , DEFAULT_PLACEMENT_STRATEGY , new LinkedList < CfDef > ( ) ) ; try { String mySchemaVersion = thriftClient . system_add_keyspace ( updateKsDefAttributes ( statement , ksDef ) ) ; sessionState . out . println ( mySchemaVersion ) ; validateSchemaIsSettled ( mySchemaVersion ) ; keyspacesMap . put ( keyspaceName , thriftClient . describe_keyspace ( keyspaceName ) ) ; } catch ( InvalidRequestException e ) { throw new RuntimeException ( e ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Add a keyspace
 @param statement - a token tree representing current statement
Add a keyspace @param statement - a token tree representing current statement
// first value is the keyspace name, after that it is all key=value