My current way of inserting rows one by one is too slow (I use cql3 prepared statements) , so I want to try batch_mutate.
Could anybody give me more details about the interface? In the javadoc it says:
public void batch_mutate(java.util.Map<java.nio.ByteBuffer,java.util.Map<java.lang.String,java.util.List<Mutation>>> mutation_map,
Description copied from interface: Cassandra.Iface
Mutate many columns or super columns for many row keys. See also: Mutation. mutation_map maps key to column family to a list of Mutation objects to take place at that scope. *
I need to understand the meaning of the elements of mutation_map parameter.
My guess is, the key in the outer map is columnfamily name, is this correct?
The key in the inner map is, probably, a key to the columnfamily (it is somewhat confusing that it is String while the outer key is ByteBuffer, I wonder what is the rational). If this is correct, how should I do it if my key is a composite one. Does anybody have an example?