[ 
https://issues.apache.org/jira/browse/CASSANDRA-4844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481389#comment-13481389
 ] 

Edward Capriolo commented on CASSANDRA-4844:
--------------------------------------------

{noformat}
[edward@tablitha apache-cassandra-1.2.0-beta1]$ bin/cqlsh
Connected to Test Cluster at localhost:9160.
[cqlsh 2.2.0 | Cassandra 1.2.0-beta1 | CQL spec 3.0.0 | Thrift protocol 19.34.0]
Use HELP for help.
cqlsh> help ;

Documented commands (type help <topic>):
========================================
ASSUME  CAPTURE  COPY  DESC  DESCRIBE  EXIT  HELP  SELECT  SHOW  SOURCE  USE

Miscellaneous help topics:
==========================
DROP_INDEX                 BOOLEAN_INPUT                SELECT_LIMIT       
ALTER_DROP                 CREATE                       DELETE_WHERE       
SELECT_EXPR                TIMESTAMP_OUTPUT             UPDATE_USING       
UUID_INPUT                 CREATE_TABLE_OPTIONS         UPDATE_WHERE       
DELETE_COLUMNS             ALTER_ALTER                  SELECT_WHERE       
DROP_TABLE                 CREATE_TABLE                 CONSISTENCYLEVEL   
CREATE_TABLE_TYPES         SELECT_COLUMNFAMILY          CREATE_INDEX       
ALTER_WITH                 SELECT_TABLE                 CREATE_KEYSPACE    
TYPES                      CREATE_COLUMNFAMILY_OPTIONS  ASCII_OUTPUT       
APPLY                      BEGIN                        DROP               
DELETE_USING               UPDATE_SET                   TIMESTAMP_INPUT    
CREATE_COLUMNFAMILY_TYPES  UPDATE_COUNTERS              ALTER              
DROP_COLUMNFAMILY          TRUNCATE                     CREATE_COLUMNFAMILY
BLOB_INPUT                 INSERT                       DELETE             
ALTER_ADD                  TEXT_OUTPUT                
DROP_KEYSPACE              UPDATE                     

Undocumented commands:
======================
DEBUG  IMPORT_INSERT

cqlsh> help CREATE_KEYSPACE;

        CREATE KEYSPACE <ksname> WITH strategy_class = '<strategy>'
                                 [AND strategy_options:<option> = <val>];

        The CREATE KEYSPACE statement creates a new top-level namespace (aka
        "keyspace"). Valid names are any string constructed of alphanumeric
        characters and underscores. Names which do not work as valid
        identifiers or integers should be quoted as string literals. Properties
        such as replication strategy and count are specified during creation
        using the following accepted keyword arguments:

          strategy_class [required]: The name of the replication strategy class
          which should be used for the new keyspace. Some often-used classes
          are SimpleStrategy and NetworkTopologyStrategy.

          strategy_options: Most strategies require additional arguments which
          can be supplied by appending the option name to "strategy_options",
          separated by a colon (:). For example, a strategy option of "DC1"
          with a value of "1" would be specified as "strategy_options:DC1 = 1".
          The replication factor option for SimpleStrategy could be
          "strategy_options:replication_factor=3".
        
cqlsh>  
{noformat}
                
> CQL3 Create keyspace statement not compatible with older versions.
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-4844
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4844
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2.0 beta 1
>            Reporter: Edward Capriolo
>
> Following the advice here.
> http://www.datastax.com/docs/1.1/dml/using_cql
> {noformat}
> [edward@tablitha apache-cassandra-1.2.0-beta1]$ bin/cqlsh -3
> Connected to Test Cluster at localhost:9160.
> [cqlsh 2.2.0 | Cassandra 1.2.0-beta1 | CQL spec 3.0.0 | Thrift protocol 
> 19.34.0]
> Use HELP for help.
> cqlsh> CREATE KEYSPACE demodb          WITH strategy_class = 
> 'org.apache.cassandra.locator.SimpleStrategy'          AND 
> strategy_options:replication_factor='1' ;
> Bad Request: line 1:129 mismatched input ':' expecting '='
> Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.
> {noformat}
> http://www.datastax.com/docs/1.1/references/cql/CREATE_KEYSPACE
> {noformat}
> cqlsh> CREATE KEYSPACE Excelsior WITH strategy_class = 'SimpleStrategy'
>    ...   AND strategy_options:replication_factor = 1;
> Bad Request: line 2:22 mismatched input ':' expecting '='
> {noformat}
> It seems that in Cassandra 1.2 I am no longer able to create a keyspace.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to