Question

When I try to send a large Map using the Java DataStax Driver, I get

Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: Not enough bytes to read a map
at com.datastax.driver.core.Responses$Error.asException(Responses.java:96)
at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:108)
at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:228)
at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:354)
at com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:571)
...

I am storing a Map here with one value being aprox. 100k characters.

It seems there is a limit on the size of these inserts, but I could not find out what the limit is, is it documented somewhere?

Is it configurable?

Était-ce utile?

La solution

I found out myself which actual limit I am hitting here:

From http://www.datastax.com/documentation/cql/3.1/cql/cql_using/use_collections_c.html:

Cassandra includes collection types that provide an improved way of handling tasks, such as building multiple email address capability into tables. Observe the following limitations of collections:

The maximum size of an item in a collection is 64K.

The error message is not ideal, at least it was not clear what the actual problem is to me!

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top