Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-3119

Cli syntax for creating keyspace is inconsistent in 1.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.0.0
    • None
    • Low

    Description

      In 0.8, to create a keyspace you could do:

      create keyspace test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = [{replication_factor:3}]
      

      In current trunk, if you try that, you get back "null". Turns out this is because the syntax for strategy_options has changed and you should not use the brackets, i.e:

      strategy_options = {replication_factor:3}
      

      (and note that reversely, this syntax doesn't work in 0.8).

      I'm not sure what motivated that change but this is very user unfriendly. The help does correctly mention the new syntax, but it is the kind of changes that takes you 5 minutes to notice. It will also break people scripts for no good reason that I can see.

      We should either:

      1. revert to the old syntax
      2. support both the new and old syntax
      3. at least print a meaningful error message when the old syntax is used

      Imho, the last solution is by far the worst solution.

      Attachments

        Activity

          People

            tjake T Jake Luciani
            slebresne Sylvain Lebresne
            T Jake Luciani
            Pavel Yaskevich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: