Running Cassandra on Windows: step by step presentation
...follow below steps to successfully setup and run sample test case...
1. Download Cassandra from http://cassandra.apache.org/download/
2. unzip under C:\cassandra\apache-cassandra-0.7.8
3. set CASSANDRA_HOME=C:\cassandra\apache-cassandra-0.7.8 and make sure JAVA_HOME is already set.
4. modify config/cassandra.yaml
and change all the directories to windows. e.g.
--------------------------------------------------------------------------------
data_file_directories:
- C:/tools/apache-cassandra-0.7.8/data/data
commitlog_directory: C:/tools/apache-cassandra-0.7.8/data/commitlog
saved_caches_directory: C:/tools/apache-cassandra-0.7.8/data/saved_caches
--------------------------------------------------------------------------------
now create below folders under C:/tools/apache-cassandra-0.7.8/data/:
callouts, bootstrap, staging, saved_caches, commitlog, data
-these folders are used for diferent purposes.
5. run cassandra.bat - it runs cassandra server
6. run cassandra-cli.bat -it runs client console
execute below in client console:
__________________________________________
get sample user details from config/password.properties
e.g. jsmith=havebadpass
connect using connect 127.0.0.1/9160
or
connect 127.0.0.1/9160 jsmith 'havebadpass';
or
c:\cassandra\apache-cassandra-0.7.8\bin>cassandra-cli.bat --host localhost
----------------------------------------------------------------------------------------
Starting Cassandra Client
Welcome to cassandra CLI.
Type 'help;' or '?' for help. Type 'quit;' or 'exit;' to quit.
[default@unknown]
===========Connect to Cassandra server===============
[default@unknown] connect 127.0.0.1/9160 jsmith 'havebadpass';
Connected to: "Test Cluster" on 127.0.0.1/9160
[jsmith@unknown] connect 127.0.0.1/9160;
Connected to: "Test Cluster" on 127.0.0.1/9160
===========Create KeySpace===============
[jsmith@unknown] create keyspace Twissandra;
b97c69f2-bc7c-11e0-84c7-e700f669bcfc
Waiting for schema agreement...
... schemas agree across the cluster
===========Set KeySpace===============
[jsmith@unknown] use Twissandra;
Authenticated to keyspace: Twissandra
===========Create Column Family 'user'===============
[default@Twissandra] create column family User with comparator = UTF8Type;
c273cb23-bc7c-11e0-84c7-e700f669bcfc
Waiting for schema agreement...
... schemas agree across the cluster
===========Insert Sample User 'jsmith'===============
[default@Twissandra] set User['jsmith']['first'] = 'John';
Value inserted.
===========Fetch Sample User 'jsmith'===============
[default@Twissandra] get User['jsmith'];
=> (column=first, value=4a6f686e, timestamp=1312230501056000)
Returned 1 results.
[default@Twissandra]
----------------------------------------------------------------------------------------
__________________________________________
More details on executing sample queries can be found at:http://wiki.apache.org/cassandra/CassandraCli
Or you could refer my previous post @ useful-bookmarks-on-cassandra
Showing posts with label Cassandra. Show all posts
Showing posts with label Cassandra. Show all posts
Friday, January 18, 2013
Tuesday, January 15, 2013
Useful bookmarks on Cassandra
Cassandra Links...
- Locking and Txn: http://ria101.wordpress.com/2010/05/12/locking-and-transactions-over-cassandra-using-cages/
- DataStax: http://www.datastax.com/docs/0.8/index
- Visual Data Model: http://www.javageneration.com/?p=70
- Data Model: http://wiki.apache.org/cassandra/DataModel
- Intro: http://nosql.mypopescu.com/post/573604395/tutorial-getting-started-with-cassandra
- Presentation: http://nosql.mypopescu.com/post/517791994/presentation-gary-dusbabek-rackspace-on-cassandra
- http://nosql.mypopescu.com/post/385372130/your-chance-to-review-the-fosdem-nosql-event#fosdem-ericevans
- Writing: http://www.mikeperham.com/2010/03/13/cassandra-internals-writing/
- Up& Running:http://blog.evanweaver.com/2009/07/06/up-and-running-with-cassandra/
- Write Path: http://wiki.apache.org/cassandra/ArchitectureInternals#Write_path
- Read Path: http://wiki.apache.org/cassandra/ArchitectureInternals#Read_path
- Deletes & Failure Detection: http://wiki.apache.org/cassandra/ArchitectureInternals#Deletes
- Slides & Videos of Cassandra Summit: http://www.datastax.com/dev/blog/slides-and-videos-cassandra-summit-2010
- Operations: http://wiki.apache.org/cassandra/Operations
- Data & Setup: http://javamaster.wordpress.com/2010/03/22/apache-cassandra-quick-tour/
- Multi Node cluser: http://wiki.apache.org/cassandra/MultinodeCluster
- Twissandra source code: https://github.com/twissandra/twissandra
- Hector examples: https://github.com/zznate/hector-examples
- Hector: https://github.com/rantav/hector
- Data Model in Java: http://schabby.de/cassandra-getting-started/
- Cassandra GUI: http://code.google.com/p/cassandra-gui/
- Hector: http://www.datastax.com/sites/default/files/hector-v2-client-doc.pdf
Subscribe to:
Comments (Atom)