Reputation: 127
I have a table with very huge data in cassandra. I am trying to read the data on partition using dse driver through hadoop mapreduce program. For some partition there might be more than 100 Million rows in the partition and when I am trying to read these partitions I am getting OperationTimedOutException.
Below is the stack trace -
com.datastax.driver.core.exceptions.OperationTimedOutException: [X.X.X.X/X.X.X.X:XXXX] Timed out waiting for server response
at com.datastax.driver.core.exceptions.OperationTimedOutException.copy(OperationTimedOutException.java:35)
at com.datastax.driver.core.exceptions.OperationTimedOutException.copy(OperationTimedOutException.java:17)
at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:28)
at com.datastax.driver.core.ArrayBackedResultSet$MultiPage.prepareNextRow(ArrayBackedResultSet.java:304)
at com.datastax.driver.core.ArrayBackedResultSet$MultiPage.isExhausted(ArrayBackedResultSet.java:260)
at com.datastax.driver.core.ArrayBackedResultSet$1.hasNext(ArrayBackedResultSet.java:134)
at com.datastax.driver.core.ArrayBackedResultSet.all(ArrayBackedResultSet.java:123)
I have tried below things and it didn't work out for me-
Any help is appreciated :)
Upvotes: 2
Views: 4799
Reputation: 458
Cassandra configuration file got parameter to limit the response time. If the response takes more time, you are bound to get Timed out waiting for server response
. But this can be configured manually in cassandra.yaml file.
Please change the below parameters as per need :
# How long the coordinator should wait for read operations to complete
read_request_timeout_in_ms: 5000
# The default timeout for other, miscellaneous operations
request_timeout_in_ms: 10000
In case you if you don't have access to cassandra configuration file. Use Pagination feature of cassandra to Query large results or you can handle pagination in your code itself.
Upvotes: 1
Reputation: 564
It seems Cassandra is not able to fulfil request within specified time. You can increase below parameter in cassandra.yaml file to deal with timeouts to an extent only not much higher.
read_request_timeout_in_ms:
write_request_timeout_in_ms:
If it doesn't help then you should look into your cassandra's log for other anomalies like tombstone etc..
Upvotes: 2