Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

mishra.anurag643_153409 avatar image
mishra.anurag643_153409 asked Erick Ramirez answered

Does increasing read consistency from LOCAL_ONE to LOCAL_QUORUM help with the load on a node ?

I am reading data from cassandra using spark job. It is throwing an error .

My query is if I change read consistency to LOCAL_QUORUM would it help me to escape this issue ?

com.datastax.driver.core.exceptions.ReadFailureException: Cassandra failure during read query at consistency LOCAL_ONE (1 responses were required but only 0 replica responded, 1 failed)
spark-cassandra-connector
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

jaroslaw.grabowski_50515 avatar image
jaroslaw.grabowski_50515 answered

I'd rather check if the node is overloaded. Try to estimate the amount of data your job is pulling out of cassandra and use SCC throttling to give it some room to breath:
https://github.com/datastax/spark-cassandra-connector/blob/master/doc/reference.md#read-tuning-parameters


Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered

No, it will not. The consistency level only determines how many replicas are required to respond to a request.

For a replication factor of 3, switching from LOCAL_ONE to LOCAL_QUORUM means that 2 replicas must respond instead of just 1 from the local DC.

In almost all cases, failure to read at LOCAL_ONE indicates that your cluster is overloaded so you either (a) need to throttle the traffic so as not to overload your cluster, or (b) increase the capacity of your cluster by adding more nodes. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.