You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by Apache Wiki <wi...@apache.org> on 2011/10/25 06:09:48 UTC

[Cassandra Wiki] Update of "CassandraCli_maki_draft2" by MakiWatanabe

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.

The "CassandraCli_maki_draft2" page has been changed by MakiWatanabe:
http://wiki.apache.org/cassandra/CassandraCli_maki_draft2?action=diff&rev1=39&rev2=40

  ## page was copied from CassandraCli
+ under development...
+ 
- Cassandra ships with a very basic interactive command line interface, or shell. Using the CLI you can connect to remote nodes in the cluster, create or update your schema, set and retrieve records and columns, or query node and cluster meta-data (i.e. cluster name, keyspace listings and disposition, etc). This page is intended for those using Cassandra 0.7.x. For CLI docs on 0.6.x, see [[CassandraCli06 | this page]].
+ Cassandra ships with a interactive command line interface, named "cassandra-cli". Using the CLI you can connect to remote nodes in the cluster, create or update your schema, set and retrieve records and columns, or query node and cluster meta-data (i.e. cluster name, keyspace listings and disposition, etc). This page is intended for those using Cassandra 0.7.x. For CLI docs on 0.6.x, see [[CassandraCli06 | this page]].
  
+ == Starting CLI ==
+ 
- You can start the CLI using the `bin/cassandra-cli` startup script in your Cassandra installation.
+ You can start the CLI using the `bin/cassandra-cli` in your Cassandra installation.
  
  {{{
- evans@achilles:~/cassandra$ bin/cassandra-cli
+ ~/cassandra$ bin/cassandra-cli
- Welcome to cassandra CLI.
+ Welcome to the Cassandra CLI.
  
- Type 'help;' or '?' for help. Type 'quit;' or 'exit;' to quit.
+ Type 'help;' or '?' for help.
+ Type 'quit;' or 'exit;' to quit.
+ 
+ [default@unknown] 
+ }}}
+ 
+ Type "help;" to print online help messages.
+ Please note that you need a semi colon ";" to complete the command.
+ 
+ {{{
+ [default@unknown] help;
+ }}}
+ 
+ You can get detailed help for each command also.
+ With "connect" command, you can connect to a cassandra node on the specified port.
+ 
+ {{{
+ [default@unknown] help connect;
  [default@unknown] connect localhost/9160;
  Connected to: "Test Cluster" on localhost/9160
+ }}}
+ 
+ "show keyspaces" prints the keyspace definitions in your cassandra installation.
+ After initial installation, the keyspace you only have will be "system" keyspace.
+ 
+ {{{
+ [default@unknown] show keyspaces;
+ }}}
+ 
+ Use "quit" command to end CLI session.
+ 
+ {{{
+ [default@unknown] quit;
+ }}}
+ 
+ With "--help" option for CLI, you can print the command line help.
+ 
+ {{{
+ ~/cassandra$ bin/cassandra-cli --help
+ }}}
+ 
+ == Loading Sample schema ==
+ 
+ Then let's load the sample schema in conf/schema-sample.txt.
+ You can use "--file" option to load the file with CLI.
+ 
+ {{{
+ ~/cassandra$ bin/cassandra-cli --host localhost --port 9160 --file conf/schema-sample.txt
+ 
+ Connected to: "Test Cluster" on node1/9160
+ a0f41dc0-feba-11e0-0000-915a0242929f
+ Waiting for schema agreement...
+ ... schemas agree across the cluster
+ Authenticated to keyspace: Keyspace1
+ 0de10680-febd-11e0-0000-915a0242929f
+ Waiting for schema agreement...
+ ... schemas agree across the cluster
+ 
+ (snip)
+ 
+ 0eaa9810-febd-11e0-0000-915a0242929f
+ Waiting for schema agreement...
+ ... schemas agree across the cluster
+ 0ed99750-febd-11e0-0000-915a0242929f
+ Waiting for schema agreement...
+ ... schemas agree across the cluster
+ }}}
+ 
+ 
+ 
+ under development
+ 
+ 
+ 
+ {{{
+ 
  [default@unknown] create keyspace Twissandra;
  d105c4f1-3c93-11e0-9fb5-e700f669bcfc
  [default@unknown] use Twissandra;