Reputation: 679
I have a Cassandra cluster with 2 nodes. I am using NetworkTopologyStrategy I was trying to increase the replication factor of keyspace in Cassandra to 2. I did the following steps: UPDATE KEYSPACE demo WITH strategy_options = {DC1:2,DC2:2}; on both the nodes Then I ran the nodetool repair on both the nodes Then I ran my Hector code to count the number of rows and columns in the database. I get the following error: Unavailable Exception Also when I run the command ./nodetool –h ip_address ring I found that both nodes ownership is 0 %. Please tell me how should I fix that.
Upvotes: 4
Views: 976
Reputation: 8985
You mention "both nodes", which implies that you have two total nodes rather than two data centers as would be suggested by your strategy options. Specifying {DC1:2,DC2:2} would require a minimum of four nodes (two in each DC to satisfy the replication factor), although this would not be advised since essentially all your nodes would be points of failure.
A minimal Cassandra cluster should have at least three nodes, in which case a RF of two would allow one node to go down without bringing down the system. It sounds like you have a single cluster (rather than two data centers), so what you really need is one more node (3 total), RF=2, using the SimpleStrategy instead of NetworkTopologyStrategy.
Upvotes: 1