brianmhess / cassandra-count

Count rows in Cassandra Table
Apache License 2.0
99 stars 0 forks source link

Enhancement: detect incorrect keyspace replication setting and warn about it #2

Open weideng1 opened 7 years ago

weideng1 commented 7 years ago

I was helping a user to try out cassandra-count and they ran into some interesting timeout errors like the following:

$ ./cassandra-count -host 127.0.0.1 -keyspace testks -table testcf -numFutures 10 -consistencyLevel ALL
An OperationTimedOutException occurred. Try increasing -numSplits or reducing -splitSize

Turned out their RF setting in testks keyspace is wrong, as this is a single node cluster, and they use SimpleStrategy with RF=3. Since this is an error condition that's often encountered by green user, can we add some logic to check RF setting for the target keyspace and complain about it when it detects an impossible condition (such as trying to get 3 replicas on a single-node cluster)?

apoorvbirthare commented 7 years ago

Its not an "impossible condition" because user might add new nodes the the cluster and it won't be a single-node cluster anymore