cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Cassandra Wiki] Update of "CassandraCli" by jeremyhanna
Date Mon, 21 Feb 2011 17:07:51 GMT
Dear Wiki user,

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

The "CassandraCli" page has been changed by jeremyhanna.
http://wiki.apache.org/cassandra/CassandraCli?action=diff&rev1=24&rev2=25

--------------------------------------------------

  Let's get back into the shell with some options specified and create some data.
  
  {{{
- tblose@quasar:~/dev/workspaces/cassandra$ bin/cassandra-cli -host localhost -port 9160 -keyspace
Keyspace1
+ tblose@quasar:~/dev/workspaces/cassandra$ bin/cassandra-cli -host localhost -port 9160
  Connected to localhost/9160
  Welcome to cassandra CLI.
  
  Type 'help;' or '?' for help. Type 'quit;' or 'exit;' to quit.
+ [default@unknown] use Keyspace1;
+ Authenticated to keyspace: Keyspace1
  [default@Keyspace1] set Standard2['jsmith']['first'] = 'John';
  Value inserted.
  [default@Keyspace1] set Standard2['jsmith']['last'] = 'Smith';
@@ -37, +39 @@

  [default@Keyspace1] set Standard2['jsmith']['age'] = '42';
  Value inserted.
  }}}
- In the example above, we created a record in the `Standard2` column family using the key
`jsmith`. This record has three columns, `first`, `last`, and `age`. Each of these commands
is the equivalent to an `insert()` using the [[API|Thrift API]].
+ Note that before we can start adding data, we have to `use Keyspace1` to set our context.
We created a record in the `Standard2` column family using the key `jsmith`. This record has
three columns, `first`, `last`, and `age`. Each of these commands is the equivalent to an
`insert()` using the [[API|Thrift API]].
- 
- {{{
- [default@unknown] use Keyspace1;
- cassandra> set Standard2['jsmith']['first'] = 'John';
- Value inserted.
- cassandra> set Standard2['jsmith']['last'] = 'Smith';
- Value inserted.
- cassandra> set Standard2['jsmith']['age'] = '42';
- Value inserted.
- }}}
- Note that before we can start adding data, we have to `use Keyspace1` to set our current
keyspace.
  
  Now let's read back the `jsmith` row to see what it contains:
  

Mime
View raw message