Prepared statement batch size in spring cassandra data

I get this warning in the log:

WARN [Native-Transport-Requests: 17058] 2014-07-29 13: 58: 33,776 BatchStatement.java (line 223) The prepared statement package for [keyspace.tablex] has a size of 10924 that exceeds the specified threshold 5120 by 5804.

Is there a way in spring cassandra data to specify size?

Cassandra 2.0.9 and spring data cassandra 1.0.0-RELEASE

+6
source share
2 answers

This is just a warning informing you that the request size exceeds a certain limit.

The request is still being processed. The reason is that large batch requests are expensive and can cause cluster imbalance. Therefore, I warn you (the developer) in advance.

Look for batch_size_warn_threshold_in_kb in cassandra.yaml to configure when this warning should appear.

Here is the ticket into which it was entered: https://issues.apache.org/jira/browse/CASSANDRA-6487

+11
source

I did extensive performance testing and tuning on Cassandra, working closely with DataStax support.

This is why I created the ingest () methods in SDC *, which are very fast in 1.0.4.RELEASE and above.

This method caches the PreparedStatement for you, and then iterates over the individual Bind values ​​and calls executeAsync for each insert. This sounds contrast intuitive, but it is the fastest (and most balanced) way to insert into Cassandra.

+1
source

Source: https://habr.com/ru/post/973048/


All Articles