Database Reference
In-Depth Information
mitlog. The other is C:\var\log\cassandra; logs will be written to a file called system.log. If you
encounter any difficulties, consult the files in these directories to see what might have happened.
If you've been trying different versions of the database and aren't worried about losing data, you
can delete these directories and restart the server as a last resort.
On Linux
The process on Linux is similar to that on Windows. Make sure that your JAVA_HOME variable is
properly set to version 1.6.0_20 or better. Then, you need to extract the Cassandra gzipped tar-
ball using gunzip. Finally, create a couple of directories for Cassandra to store its data and logs,
and give them the proper permissions, as shown here:
ehewitt@morpheus$ cd /home/eben/books/cassandra/dist/apache-cassandra-0.7.0-beta1
ehewitt@morpheus$ sudo mkdir -p /var/log/cassandra
ehewitt@morpheus$ sudo chown -R ehewitt /var/log/cassandra
ehewitt@morpheus$ sudo mkdir -p /var/lib/cassandra
ehewitt@morpheus$ sudo chown -R ehewitt /var/lib/cassandra
Instead of ehewitt , of course, substitute your own username.
Starting the Server
To start the Cassandra server on any OS, open a command prompt or terminal window, navigate
to the <cassandra-directory>/binwhere you unpacked Cassandra, and run the following com-
mand to start your server. In a clean installation, you should see some log statements like this:
eben@morpheus$ bin/cassandra -f
INFO 13:23:22,367 DiskAccessMode 'auto' determined to be standard, indexAccessMode
is standard
INFO 13:23:22,475 Couldn't detect any schema definitions in local storage.
INFO 13:23:22,476 Found table data in data directories.
Consider using JMX to call org.apache.cassandra.service.StorageService
.loadSchemaFromYaml().
INFO 13:23:22,497 Cassandra version: 0.7.0-beta1
INFO 13:23:22,497 Thrift API version: 10.0.0
INFO 13:23:22,498 Saved Token not found. Using qFABQw5XJMvs47lg
INFO 13:23:22,498 Saved ClusterName not found. Using Test Cluster
INFO 13:23:22,502 Creating new commitlog segment /var/lib/cassandra/commitlog/
CommitLog-1282508602502.log
INFO 13:23:22,507 switching in a fresh Memtable for LocationInfo at
CommitLogContext(
file='/var/lib/cassandra/commitlog/CommitLog-1282508602502.log', position=276)
INFO 13:23:22,510 Enqueuing flush of Memtable-LocationInfo@29857804(178 bytes,
4 operations)
INFO 13:23:22,511 Writing Memtable-LocationInfo@29857804(178 bytes, 4 operations)
Search WWH ::




Custom Search