You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aaron Morton (JIRA)" <ji...@apache.org> on 2011/01/19 10:48:43 UTC

[jira] Created: (CASSANDRA-2008) CLI help incorrect in places

CLI help incorrect in places
----------------------------

                 Key: CASSANDRA-2008
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
    Affects Versions: 0.7.0
            Reporter: Aaron Morton
            Assignee: Aaron Morton
            Priority: Trivial


Found some errors in the CLI help, such as these for create column family.

- memtable_operations: Flush memtables after this many operations
- memtable_throughput: ... or after this many bytes have been written
- memtable_flush_after: ... or after this many seconds

Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Aaron Morton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron Morton updated CASSANDRA-2008:
------------------------------------

    Attachment: 2008-3.patch

2008-2.patch used the wrong target in build.xml when copying resources into the out path. I missed that these are now copied to ${build.classes.main}

Also fixed typo; fixed an error in the help for drop keyspace / column family; and fixed some error messages to say "help;" rather than "help"

2008-3.patch is rebased against current trunk and includes all the work from the previous patches. 

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.8
>
>         Attachments: 2007.txt, 2008-2.patch, 2008-3.patch
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Aaron Morton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995614#comment-12995614 ] 

Aaron Morton commented on CASSANDRA-2008:
-----------------------------------------

To be clear, I am not using conf/cassandra.yaml as the source of online help for cassandra-cli. 

I'm adding a file called o.a.c.cli.CliHelp.yaml to the cassandra jar as a non code resource. The sole purpose of this file is to store the online help for the cli. It is organised around the antlr nodes as defined in the grammer (as the existing code does). 

In the CliHelp.yaml file I'm using literal yaml strings to hold the help contents.  

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.2
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998610#comment-12998610 ] 

Jonathan Ellis commented on CASSANDRA-2008:
-------------------------------------------

How is this coming?

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.3
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998635#comment-12998635 ] 

Jon Hermes commented on CASSANDRA-2008:
---------------------------------------

bq. I am not a fan either of the cli somehow extracting yaml comments
Not what I was suggesting, but Aaron nailed it with the `commands: {name,help}` blocks.

Hadn't seen #2007 yet, but that looks very good. Separating node.yaml and schema.yaml is good, but separating and throwing away schema.yaml (for a script solution) is even better.

I would rename `o.a.c.cli.CliHelp.yaml` to something more generic and move it out of cli(conf/config_help.yaml). The cli can read it from there, it's an intuitive place to find it for a new user, and it can be mirrored onto the wiki and anywhere else it's referenced. 

If there were a way to couple it with or generate it from interface/cassandra.thrift:{Ks,Cf}Def, o.a.c.config.Raw{Keyspace,ColumnFamily} and o.a.c.config.{KS,CF}MetaData, it would be even better-er. Currently all three are kept in sync by force of will which has introduced multiple bugs already. (Note: this is not in the scope of this ticket, but would be worth keeping in mind.)

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.3
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Aaron Morton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985620#action_12985620 ] 

Aaron Morton commented on CASSANDRA-2008:
-----------------------------------------

If their are any discrepancies between the help in cassandra.yaml and the CLI should I take the content from the yaml file ? Should the two have the same content?

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams updated CASSANDRA-2008:
----------------------------------------

    Fix Version/s:     (was: 0.7.2)
                   0.7.3

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.3
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2008) CLI help incorrect in places

Posted by "Aaron Morton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron Morton updated CASSANDRA-2008:
------------------------------------

    Attachment: 0001-moved-cli-help-to-yaml-resource-and-expanded-content.patch

Rebased to the current trunk and updated content.

0001-moved-cli-help-to-yaml-resource-and-expanded-content.patch is the only patch needed, could not see how to delete the others.

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.8
>
>         Attachments: 0001-moved-cli-help-to-yaml-resource-and-expanded-content.patch, 2007.txt, 2008-2.patch, 2008-3.patch
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Issue Comment Edited: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Aaron Morton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995601#comment-12995601 ] 

Aaron Morton edited comment on CASSANDRA-2008 at 2/17/11 12:16 AM:
-------------------------------------------------------------------

@jon I was combining this with CASSANDRA-2007 to move the demo keyspace out of cassandra.yaml and into a cli file. In the user groups we always tell people to use the cli to create a keyspace, but we don't have an example. My understanding was loading schema defs through JConsole was no longer the preferred method. I went with yaml as we already have it in the tree, can change if there is an agreed alternative. 

@jonathan Am using literals in the yaml file so newlines are preserved http://www.yaml.org/spec/1.2/spec.html#id2760844 The yaml looks something like
{noformat} 
commands:
  - name: NODE_ADD_KEYSPACE
    help: |
    blah blah

    blah
  - name: NODE_UPDATE_KEYSPACE
{noformat}

I'll get the rest of the help sorted and then we can edit it if needed. It will not be a straight lift from cassandra.yaml, but there is more information in cassandra.yaml and I want to make most of that available in the cli. My main goal here is to cut out some of the simple support questions. 

 

      was (Author: amorton):
    @jon I was combining this with CASSANDRA-2007 to move the demo keyspace out of cassandra.yaml and into a cli file. In the user groups we always tell people to use the cli to create a keyspace, but we don't have an example. My understanding was loading schema defs through JConsole was no longer the preferred method. I went with yaml as we already have it in the tree, can change if there is an agreed alternative. 

@jonathan Am using literals in the yaml file so newlines are preserved http://www.yaml.org/spec/1.2/spec.html#id2760844 The yaml looks something like
{{noformat}} 
commands:
  - name: NODE_ADD_KEYSPACE
    help: |
    blah blah

    blah
  - name: NODE_UPDATE_KEYSPACE
{{noformat}}

I'll get the rest of the help sorted and then we can edit it if needed. It will not be a straight lift from cassandra.yaml, but there is more information in cassandra.yaml and I want to make most of that available in the cli. My main goal here is to cut out some of the simple support questions. 

 
  
> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.2
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995561#comment-12995561 ] 

Jonathan Ellis commented on CASSANDRA-2008:
-------------------------------------------

I am not a fan either of the cli somehow extracting yaml comments (don't most yaml parsers ignore comments?) or more fundamentally the assumption that comments explaining a config option are either appropriate or sufficient for the cli.  The two are fairly different beasts even when covering similar material.

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.2
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Aaron Morton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998749#comment-12998749 ] 

Aaron Morton commented on CASSANDRA-2008:
-----------------------------------------

Should be done in the next day or two. In line with the recent discussions on reducing what goes into the point released I've been writing it against the 0.8 trunk.

Earthquake has sapped my energy this week :( 


> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.3
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995634#comment-12995634 ] 

Jonathan Ellis commented on CASSANDRA-2008:
-------------------------------------------

bq. My understanding was loading schema defs through JConsole was no longer the preferred method. I went with yaml as we already have it in the tree, can change if there is an agreed alternative. 

I'm okay with yaml since that's our import/export format in 0.7, but a sample script that can be run with cassandra-cli -f would be more future-proof.

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.2
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Aaron Morton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron Morton updated CASSANDRA-2008:
------------------------------------

    Attachment: 2007.txt

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.8
>
>         Attachments: 2007.txt
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2008) CLI help incorrect in places

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018203#comment-13018203 ] 

Jonathan Ellis commented on CASSANDRA-2008:
-------------------------------------------

Sorry for the delay. Would you mind rebasing?

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.8
>
>         Attachments: 2007.txt, 2008-2.patch, 2008-3.patch
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Aaron Morton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995259#comment-12995259 ] 

Aaron Morton commented on CASSANDRA-2008:
-----------------------------------------

I'm working on changing the cli help to be driven from a yaml file (in the jar) to make it easier to be updated. I've ported over the existing help and am in the process of re-writing the help to match cassandra.yaml and the wiki. 

Below is a (first draft) example, if anyone has feedback on the style let me know. I'm trying to keep the text < 80 chars wide. I can also add simple pagination through the ConsoleReader we use if people think it would be handy.

{noformat}
[default@unknown] help create keyspace;
create keyspace <keyspace>;
create keyspace <keyspace> with <att1>=<value1>;
create keyspace <keyspace> with <att1>=<value1> and <att2>=<value2> ...;

Create a new keyspace with the specified values for the given set of 
attributes.

Parameters:
- keyspace: Requried name of the new keyspace, "system" is reserved for 
  Cassandra internals. Names must only contain letters, numbers and 
  underscores.

Attributes:
- replication_factor: Required number of replicas of each row. Applies 
  to SimpleStrategy and OldNetworkTopologyStrategy placement strategys, 
  the NetworkTopologyStrrategy uses additonal configuration.

- placement_strategy: Required class that determines how replicas
  are distributed among nodes. Contains both the class as well as
  configuration information.  Must extend AbstractReplicationStrategy.

  Out of the box, Cassandra provides 
    - org.apache.cassandra.locator.SimpleStrategy 
    - org.apache.cassandra.locator.NetworkTopologyStrategy
    - org.apache.cassandra.locator.OldNetworkTopologyStrategy


  SimpleStrategy merely places the first replica at the node whose 
  token is closest to the key (as determined by the Partitioner), and 
  additional replicas on subsequent nodes along the ring in increasing 
  Token order.

  With NetworkTopologyStrategy, for each datacenter, you can specify 
  how many replicas you want on a per-keyspace basis. Replicas are 
  placed on different racks within each DC, if possible. 

  OldNetworkToplogyStrategy [formerly RackAwareStrategy] 
  places one replica in each of two datacenters, and the third on a
  different rack in in the first.  Additional datacenters are not
  guaranteed to get a replica.  Additional replicas after three are 
  placed in ring order after the third without regard to rack or 
  datacenter.

- strategy_options: Optional additional options for placement_strategy.
  Applies only to NetworkTopologyStrategy.

Examples:
create keyspace foo with
        placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy'
        and replication_factor = 3;
create keyspace foo with
        placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy'
        and strategy_options=[{DC1:2, DC2:2}];
{noformat}

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.2
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Aaron Morton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron Morton updated CASSANDRA-2008:
------------------------------------

    Attachment: 2008-2.patch

Second patch includes all the stuff from first patch and adds CounterColumnType to the help.

Against the 0.8 trunk

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.8
>
>         Attachments: 2007.txt, 2008-2.patch
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004117#comment-13004117 ] 

Jonathan Ellis commented on CASSANDRA-2008:
-------------------------------------------

{noformat}
$ ant
...
BUILD SUCCESSFUL

$ bin/cassandra-cli
Exception in thread "main" java.lang.AssertionError
	at org.apache.cassandra.cli.CliClient.getHelp(CliClient.java:154)
{noformat}

classpath problems for the non-jar case?

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.8
>
>         Attachments: 2007.txt, 2008-2.patch
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995549#comment-12995549 ] 

Jon Hermes commented on CASSANDRA-2008:
---------------------------------------

The problem is that it's yet another place to duplicate the config help. 

There should be one and only one definition of the config options and the sample config (conf/cassandra.yaml), the cli-help, and the wiki (and anything else that shows up) should all point to or read from that one definition like a bible. Adding more points of denormalization, while fine for c*, is bad for c* code.

No matter how good the effort for this helpfile is, as new knobs and buttons get added to the config, it will suffer rot.

Putting it in YAML wouldn't be my first choice as YAML is slowly getting deprecated, but that would suffice to make it parseable by the CLI and readable by the sample config at the same time.

-

Aside from the strategy for this bug, that help text looks pretty clean. I'd be sure to separate "required" from "optional/defaulted" (and give the defaults for these in a consistent way), and to sort the options. (The wiki sorts them alphabetically and groups them by related config, for example, and still not sure if that's ideal.)

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.2
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Aaron Morton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995601#comment-12995601 ] 

Aaron Morton commented on CASSANDRA-2008:
-----------------------------------------

@jon I was combining this with CASSANDRA-2007 to move the demo keyspace out of cassandra.yaml and into a cli file. In the user groups we always tell people to use the cli to create a keyspace, but we don't have an example. My understanding was loading schema defs through JConsole was no longer the preferred method. I went with yaml as we already have it in the tree, can change if there is an agreed alternative. 

@jonathan Am using literals in the yaml file so newlines are preserved http://www.yaml.org/spec/1.2/spec.html#id2760844 The yaml looks something like 
commands:
  - name: NODE_ADD_KEYSPACE
    help: |
    blah blah

    blah
  - name: NODE_UPDATE_KEYSPACE


I'll get the rest of the help sorted and then we can edit it if needed. It will not be a straight lift from cassandra.yaml, but there is more information in cassandra.yaml and I want to make most of that available in the cli. My main goal here is to cut out some of the simple support questions. 

 

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.2
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Aaron Morton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995601#comment-12995601 ] 

Aaron Morton edited comment on CASSANDRA-2008 at 2/17/11 12:16 AM:
-------------------------------------------------------------------

@jon I was combining this with CASSANDRA-2007 to move the demo keyspace out of cassandra.yaml and into a cli file. In the user groups we always tell people to use the cli to create a keyspace, but we don't have an example. My understanding was loading schema defs through JConsole was no longer the preferred method. I went with yaml as we already have it in the tree, can change if there is an agreed alternative. 

@jonathan Am using literals in the yaml file so newlines are preserved http://www.yaml.org/spec/1.2/spec.html#id2760844 The yaml looks something like
{{noformat}} 
commands:
  - name: NODE_ADD_KEYSPACE
    help: |
    blah blah

    blah
  - name: NODE_UPDATE_KEYSPACE
{{noformat}}

I'll get the rest of the help sorted and then we can edit it if needed. It will not be a straight lift from cassandra.yaml, but there is more information in cassandra.yaml and I want to make most of that available in the cli. My main goal here is to cut out some of the simple support questions. 

 

      was (Author: amorton):
    @jon I was combining this with CASSANDRA-2007 to move the demo keyspace out of cassandra.yaml and into a cli file. In the user groups we always tell people to use the cli to create a keyspace, but we don't have an example. My understanding was loading schema defs through JConsole was no longer the preferred method. I went with yaml as we already have it in the tree, can change if there is an agreed alternative. 

@jonathan Am using literals in the yaml file so newlines are preserved http://www.yaml.org/spec/1.2/spec.html#id2760844 The yaml looks something like 
commands:
  - name: NODE_ADD_KEYSPACE
    help: |
    blah blah

    blah
  - name: NODE_UPDATE_KEYSPACE


I'll get the rest of the help sorted and then we can edit it if needed. It will not be a straight lift from cassandra.yaml, but there is more information in cassandra.yaml and I want to make most of that available in the cli. My main goal here is to cut out some of the simple support questions. 

 
  
> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.2
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2008) CLI help incorrect in places

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987704#action_12987704 ] 

Jon Hermes commented on CASSANDRA-2008:
---------------------------------------

The YAML should be correct, and http://wiki.apache.org/cassandra/StorageConfiguration should be ultimately correct. All should say the same things.

> CLI help incorrect in places
> ----------------------------
>
>                 Key: CASSANDRA-2008
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2008
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.0
>            Reporter: Aaron Morton
>            Assignee: Aaron Morton
>            Priority: Trivial
>             Fix For: 0.7.2
>
>
> Found some errors in the CLI help, such as these for create column family.
> - memtable_operations: Flush memtables after this many operations
> - memtable_throughput: ... or after this many bytes have been written
> - memtable_flush_after: ... or after this many seconds
> Should be millions of ops, MB's written and minutes not seconds.  Have confirmed thats how the values are used. Will check all the help. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.