java - Copy a ColumnFamily in cassandra (the meta-data, not the actual rows) -


i need copy columnfamily in same keyspace -- don't care data in columnfamily, cf's meta-data (properties, settings, etc -- whatever you'd call it).

i can't find online describes process (neither can find whether it's possible or not).

any suggestions/ideas?

i can use python or java (astyanax or hector). also, i'm running cassandra 1.1

thanks!

you need schema existing column family, create 1 same settings apart different name. can in cassandra-cli with

use keyspace; show schema; 

then copy schema column family want copy, change name , paste in.

or if using cql, can use same approach cqlsh or cql driver.

you can in hector. use cluster.describekeyspace() keyspacedefinition keyspace. find column family want copy in list getcfdefs(). change name setname , create cluster.addcolumnfamily.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

php - Dynamic url re-writing using htaccess -

java - Multi-Label Document Classification -