user2373881
user2373881

Reputation: 119

New cassandra cluster using vnodes shows unbalanced ring

Just now i created a 3 node cassandra cluster on my local machines using vagrant, running cassandra 2.0.13

following is my cassandra.yaml config for each node

node0

cluster_name: 'MyCassandraCluster'
num_tokens: 256
seed_provider:
  - class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
     - seeds:  "192.168.33.10,192.168.33.11"
listen_address: 192.168.33.10
rpc_address: 0.0.0.0
endpoint_snitch: RackInferringSnitch

node1

cluster_name: 'MyCassandraCluster'
num_tokens: 256
seed_provider:
  - class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
     - seeds:  "192.168.33.10,192.168.33.11"
listen_address: 192.168.33.11
rpc_address: 0.0.0.0
endpoint_snitch: RackInferringSnitch

node2

cluster_name: 'MyCassandraCluster'
num_tokens: 256
seed_provider:
  - class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
     - seeds:  "192.168.33.10,192.168.33.11"
listen_address: 192.168.33.12
rpc_address: 0.0.0.0
endpoint_snitch: RackInferringSnitch

when i run

nodetool status

i get following result

Datacenter: 168
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address        Load       Tokens  Owns (effective)  Host ID                               Rack
UN  192.168.33.12  88.34 KB   256     67.8%             b3d6d9f2-3856-445b-bad8-97763d7b22c7  33
UN  192.168.33.11  73.9 KB    256     66.4%             67e6984b-d822-47af-b26c-f00aa39f02d0  33
UN  192.168.33.10  55.78 KB   256     65.8%             4b599ae0-dd02-4c69-85a3-05782a70569e  33

According to tutorial i have attended from datastax each node should own 33% of data but here it show each node owns around 65% of data i am not able to figure own what am i doing wrong.

I have not loaded any data in cluster nor have created any keyspace , its brand new cluster without any data.

pls help me figure out the problem

thanks

Upvotes: 1

Views: 695

Answers (2)

phact
phact

Reputation: 7305

For the Owns / Load column to be accurate in nodetool status, you need to specify a keyspace.

Try nodetool status <keyspace name> and it will actually show you the %'s for how much data is stored in each node.

Upvotes: 0

Rachel P
Rachel P

Reputation: 41

If there is no data loaded into the cluster, there shouldn't be any percentage owned. Also, your nodetool output IP addresses do not match what you put earlier for your IPs- maybe you are looking at different machines that already have data loaded? Last, you may not want to use a RackInferringSnitch since it seems that all your nodes are in the same rack. If you are just playing around in a single datacenter, you can use the simple snitch. Otherwise, NetworkTopology is good for multiple datacenters

Upvotes: 2

Related Questions