If you can't read please download the document
Upload
edward-capriolo
View
2.820
Download
2
Embed Size (px)
Citation preview
Blue with Bottom Title
Cassandra/NoSQL LAN Party
Concept
Cassandra works on hetrogenious/commodity hardware
Naturally works in multi-node multi-dc scenarios
LAN parties are fun. Remember quake on 10mb?
Target Setup
Overall Steps
Organize
Setup Networking
Calculate Tokens
Startup Cassandra
Create Keyspace and Column Family
Quick example of read write
Party!
Organize
There should be three tables in room (ny,jp,fr)Each table has a switch
Each switch connected to other switch by cat5
Each tables should have 3-8 4ft ethernet cables
Note networking Guru's and spread them across tables
Not C* guru's and spread them as well
C* NYC people will help as well
Networking
At your table you should see an IP/mask
It should look like 10.1.0.X/255.0.0.0
Count the number of people at your table with laptop (count the laptop already set up)
Give each a number 2,3,4... call it N
Those people should set to IP 10.1.0.N
When done ping 10.1.0.1,10.2.0.1
If your using your own gear shut down firewall
If pings work wait for next stage
Calculate Tokens
Total machines N. Your machine is M(admin write numbers on post-its and hand them out, alternating number per table)
Run java TokenCalculator M N
Copy that # to cassandra.yaml
Set your IP as listen_address
Don't start Cassandra yet!
Quick check to make sure clock is in sync
Startup Cassandra
Projector laptop should be running 'watch nodetool ring'
Have someone give your setup the once over
./bin/cassandra -f
All cheer and take a swig as nodes join network!
Wait till we gets everyone online
Create a Keyspace and Column Family (done by admin)
create keyspace worldwith placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy'and strategy_options={1:3, 2:3, 3:3};
use world; create column family data with key_validation_class=UTF8Type AND comparator=UTF8Type AND default_validation_class=UTF8Type;
Use world; set Data['bsmith']['name']='bob';
Quick example of read/write
Start bin/cassandra-cli -h -p 9160
USE world;
List data;
get Data['bsmith'];
Disconnect some cables
Consistencylevel as [QUORUM,ALL,LOCAL_QUORUM,ONE];
Party!