I’m using Hector API to connect to Cassandra and use counter column family to update counters. The data is collected from page impressions and the volume is around 2000 events per second.
I’m using five large AWS instances in which Cassandra nodes are running. I feel there is some problem with the consistency level.
I have tried QUARM and ONE consistency levels but after two hours it is throwing timedout exception.
And also I have tried with ANY consistency level but I am getting following exception:
Code:
ConfigurableConsistencyLevel ccl = new ConfigurableConsistencyLevel();
ccl.setDefaultReadConsistencyLevel(HConsistencyLevel.ONE);
ccl.setDefaultWriteConsistencyLevel(HConsistencyLevel.ANY);
me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:Consistency level ANY is not yet supported for counter columnfamily)
I’m wondering for write operation what is the consistency level? Could anyone please suggest a solution that work for me?
Are all your node in a single datacenter ? If not you may want to look at LOCAL_QUORUM. If it is not the problem maybe you didn't choose the right snitch. I would recommend the gossipingfile one.