Database Reference
In-Depth Information
eben@morpheus:~/books/cassandra/dist/apache-cassandra-0.7.0-beta1$ bin/
cassandra-cli localhost/9160
Welcome to cassandra CLI.
Type 'help' or '?' for help. Type 'quit' or 'exit' to quit.
[default@unknown]
NOTE
If you see this error while trying to connect to a server:
Exception connecting to localhost/9160 - java.net.ConnectException:
Connection refused: connect
make sure that a Cassandra instance is started at that host and port and that you can ping the host you're
trying to reach. There may be firewall rules preventing you from connecting. Also make sure that you're
using the new 0.7 syntax as described earlier, as it has changed from previous versions.
The CLI indicates that you're connected to a Cassandra server cluster called “Test Cluster”.
That's because this cluster of one node at localhost is set up for you by default.
NOTE
In a production environment, be sure to remove the Test Cluster from the configuration.
Describing the Environment
After connecting to your Cassandra instance Test Cluster, if you're using the binary distribution,
an empty keyspace, or Cassandra database, is set up for you to test with.
To see the name of the current cluster you're working in, type:
[default@unknown] show cluster name
Test Cluster
To see which keyspaces are available in the cluster, issue this command:
[default@unknown] show keyspaces
system
If you have created any of your own keyspaces, they will be shown as well. The system keyspace
is used internally by Cassandra, and isn't for us to put data into. In this way, it's similar to the
master and temp databases in Microsoft SQL Server. This keyspace contains the schema defin-
Search WWH ::




Custom Search