Is there a recommended way, using a Java client, to copy / clone a row in a Cassandra column family?
I’m currently using Hector (1.0-2) with Cassandra 1.1.8 but switching to another client library shouldn’t be a problem.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Nope, get all rows by sending a list of keys(happens in parallel on the disks so i/o is faster that way). loop through all rows in memory(which is real fast anyways) and do one write operation writing all rows back to the disks.(again, the write is done on all disks in parallel so disk write is fast).
The i/o is what you need to worry about anyways as the in-memory ops are fast typically. If you are doing A HUGE amount of copying, you need to switch to map/reduce instead.
If you are using PlayOrm on cassandra, just write a copy method on the entity you are copying to keep your code clean.