rename keyspace and columnfamily in cassandra 1.2

倖福魔咒の 提交于 2019-12-01 11:04:47

问题


How to rename keyspace and columnfamily in cassandra 1.2? I know that cassandra-cli rename api is no longer supported - How to rename keyspace in Cassandra. Maybe there are some api in CQL3? Or some api for creating new columnfamily and coping all data from old to new columnfamily?


回答1:


Renaming is disabled internally, not just within the thrift API. So there isn't a CQL command to do it either.

However, there is a manual process which is described here:

https://issues.apache.org/jira/browse/CASSANDRA-1585




回答2:


For rename only a column family also you can follow the next instructions:

http://mail-archives.apache.org/mod_mbox/cassandra-user/201201.mbox/%3C4EF306AC-98D5-45BE-A29C-B68187FBA9C9@thelastpickle.com%3E

Basically is create the new CF, copy the SStables from the old column family to the one renaming the files.



来源:https://stackoverflow.com/questions/15759667/rename-keyspace-and-columnfamily-in-cassandra-1-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!