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,

                         ConsistencyLevel consistency_level)

                  throws InvalidRequestException,

                         UnavailableException,

                         TimedOutException,

                         org.apache.thrift.TException

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?

 

Thanks,

 

Leonid



This email, along with any attachments, is confidential and may be legally privileged or otherwise protected from disclosure. Any unauthorized dissemination, copying or use of the contents of this email is strictly prohibited and may be in violation of law. If you are not the intended recipient, any disclosure, copying, forwarding or distribution of this email is strictly prohibited and this email and any attachments should be deleted immediately. This email and any attachments do not constitute an offer to sell or a solicitation of an offer to purchase any interest in any investment vehicle sponsored by Moon Capital Management LP (“Moon Capital”). Moon Capital does not provide legal, accounting or tax advice. Any statement regarding legal, accounting or tax matters was not intended or written to be relied upon by any person as advice. Moon Capital does not waive confidentiality or privilege as a result of this email.