Change Helenus Consistency Level in CQL query

cassandra, helenus, node.js, thrift

Solution

The problem is you can't use CL.ANY for reads, only for writes. ANY means count a commit log write as success, even if none of the replicas are available. Since commit logs aren't readable by queries it doesn't make sense to use CL.ANY for reads so Cassandra won't let you.

Problem

I'm doing some tests with Cassandra and its Node.JS Driver, Helenus. Is there any way to change the Consistency Level of a query, using CQL? Helenus documentation only shows an example of doing this using the Helenus Thrift connector, but I want to use the CQL connector. I tried to query Cassandra like this ``` conn.cql(cqlRead, vals, {ConsistencyLevel:ANY, gzip:true}, cb); ``` but node threw this error ``` ReferenceError: ANY is not defined ``` Then, I changed 'ANY' to '1' and node ran the code, but I didn't noticed any difference.

Original source