更改Cassandra分区器类型 [英] Changing Cassandra partitioner type

查看:146
本文介绍了更改Cassandra分区器类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关更改分区类型的问题:我想使用sstableloader将数据从旧集群复制到新集群。但旧集群使用RandomPartitioner,而新集群使用Murmur3Partitioner。您可能会问为什么不使用COPY命令将数据导出到csv并再次导入?好吧,我们有巨大的数据集和COPY命令不会工作(所有其他节点的数据将聚合到一台机器)。

Question about changing partitioner types: i want to use sstableloader to copy data from an old cluster to a newer cluster. but the old cluster is using RandomPartitioner, whereas the new one uses Murmur3Partitioner. You might ask why not using COPY command to export data to csv and import it again? Well we have huge data sets and COPY command would not work (all other node's data would aggregate to one machine).

可以将新的集群分区器切换到RandomPartitioner,使用sstableloader进行数据复制,并切换回来? (我试过切换,但cassandra不会重新启动,因为...)

is it possible to switch new cluster partitioner to RandomPartitioner, do data replication using sstableloader, and switch back? (i tried switching, but cassandra won't restart because of it...)

推荐答案

分区器。这将需要Cassandra重新分配所有的数据,不支持。

No, you can't change the partitioner. That would require Cassandra to redistribute all the data and is not supported.

您可以使用sstable2json(与旧的yaml),然后json2sstable(与新的yaml)您的SSTables手动。然后可以使用sstableloader。

You could use sstable2json (with the old yaml) and then json2sstable (with the new yaml) to convert your SSTables manually. Then you can use sstableloader.

这篇关于更改Cassandra分区器类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆