Alan Miranda
Alan Miranda

Reputation: 183

Cannot write on table on Amazon Keyspaces

I have a problem to write data on aws keyspace with spark conector. This message below shows:

ERROR QueryExecutor: Failed to execute: com.datastax.spark.connector.writer.RichBoundStatementWrapper@681c47f5 com.datastax.oss.driver.api.core.servererrors.WriteTimeoutException: Cassandra timeout during SIMPLE write query at consistency LOCAL_QUORUM (2 replica were required but only 0 acknowledged the write)

Spark version: 3.1 EMR: 6.3.1 Cassandra: 3.11.2

Upvotes: 2

Views: 412

Answers (2)

Autumn88
Autumn88

Reputation: 351

When you get the WriteTimeout error with Amazon Keyspaces usually indicates when a write request fails due to insufficient capacity. To give more insight we recommend using the Cloud Watch Monitoring template that we’ve put on Github here: https://github.com/aws-samples/amazon-keyspaces-cloudwatch-cloudformation-templates . Its a Cloud Watch template that will help you to monitor your resources, The information from the Cloud watch metrics will help us to determine why you are getting this error so we can better help you.

Upvotes: 2

gaurav garg
gaurav garg

Reputation: 21

First please check the load on all nodes on the cluster means IO, CPU and memory statistics if all they are Ok.

As a workaround you can also consider to increase the below timeout parameters in cassandra.conf. write_request_timeout_in_ms & read_request_timeout_in_ms

Upvotes: 0

Related Questions