6

我在日志中收到此警告:

WARN [Native-Transport-Requests:17058] 2014-07-29 13:58:33,776 BatchStatement.java(第 223 行)[keyspace.tablex] 的准备好的语句的批次大小为 10924,超过了 5804 的指定阈值 5120。

spring data cassandra中有没有办法指定大小?

Cassandra 2.0.9 和 Spring Data cassandra 1.0.0-RELEASE

4

2 回答 2

12

这只是一个警告,通知您查询大小超过了一定的限制。

该查询仍在处理中。背后的原因是更大的批量查询成本很高,并且可能导致集群不平衡。因此事先警告您(开发人员)。

寻找调整何时应产生此警告batch_size_warn_threshold_in_kbcassandra.yaml

这是介绍它的票:https ://issues.apache.org/jira/browse/CASSANDRA-6487

于 2014-08-27T09:23:00.753 回答
1

I have done extensive performance testing and tuning on Cassandra, working closely withe DataStax Support.

That is why I created the ingest() methods in SDC*, which are super fast in 1.0.4.RELEASE and higher.

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

于 2014-08-28T14:28:25.203 回答