Posts

Showing posts with the label Cassandra

[Level 3] Cassandra stress tool from git in Ubuntu.

If you want to do the stress test for Cassandra. You could try an open source project call cassandra-stress of zznate. First you must to have git client and maven. Please reference here: git installation , maven installation Clone the src from git. # git clone https://github.com/zznate/cassandra-stress.git Then you would find a folder named "cassandra-stress", cd it and build the binary. # cd ./cassandra-stress # mvn install and mvn would create a sub folder "target", cd it and run the stress script. # cd ./target/appassembler/ # sh ./bin/stress -o insert -b 1000 -n 2000000 localhost:9160 Wish this helps. regards, Stanley Huang

[Level 2] Cassandra token generation tool by Python.

#!/bin/env python import sys if (len(sys.argv) > 1): num=int(sys.argv[1]) else: num=int(raw_input("How many nodes are in your cluster? ")) for i in range(0, num): print 'node %d: %d' % (i, (i*(2**127)/num)) $ ./cassandraTokenGenTools.py How many nodes are in your cluster? 5 node 0: 0 node 1: 34028236692093846346337460743176821145 node 2: 68056473384187692692674921486353642291 node 3: 102084710076281539039012382229530463436 node 4: 136112946768375385385349842972707284582 Wish this helps. regards, Stanley Huang

[Level 1] How to setup Cassandra home directory

If you want to create multi Cassandra instances and only use one copy of binary. You need to setup CASSANDRA_HOME environment variable. If you only use symbolic link to link binary file, Cassandra will search the real binary directory and set its parent directory as the home, if you don't setup the CASSANDRA_HOME environment variable. # export CASSANDRA_HOME=[new directory you want] # cd [new directory you want] # ./bin/cassandra Wish this helps. regards, Stanley Huang

[Level 2] Repication in Cassandra 0.7 Beta

In Cassandra 0.7, it supports online change schema. So, when you want to create a keyspace, the steps are as following: 1. Connect to Cassandra  # ./bin/cassandra-cli  2. Create keyspace # create keyspace keyspace_name with replication_factor = n PS. In here, 'n' is integer, and the number of cassandra node must great or equal than 'n'. You can set replication factor Wish this helps. regards, Stanley Huang

[Info] Riptano Cassandra Summit 2010 Vedios

Good for you to reference. http://www.riptano.com/summit-2010 Wish this helps. regards, Stanley Huang

[Level 1] Install Cassandra on OpenSolaris

You can install Cassandra by following steps: # pfexec mkdir -p / var /lib/cassandra # pfexec mkdir -p / var /lib/cassandra/data # pfexec mkdir -p / var /lib/cassandra/commitlog # pfexec mkdir -p / var /lib/cassandra/logs # pfexec mkdir -p / var /log/cassandra # pfexec chown -R root:root / var /lib/cassandra / var /log/cassandra # pfexec chmod -R 755 / var /lib/cassandra Set user environment on ~/.bashrc export CASSANDRA_HOME=$HOME/cassandra/src export CASSANDRA_CONF=$HOME/cassandra/conf export CASSANDRA_PATH=$CASSANDRA_HOME/bin export PATH=$CASSANDRA_PATH:$PATH Then you have to download git (SUNWgit) from OpenSolaris repository to get Cassandra's source code. # pkg install SUNWgit Use git command as following to get the Cassandra's source: # cd ~/ ## change working directory to user home, because we set CASSANDRA_HOME directory in $HOME/cassandra # git clone git: //git.apache.org/cassandra.git src Select the 0.6.3 tag and create...