Cassandra RandomPartitioner 版本 1.2.3

标签 cassandra

我使用 apt 在 debian 上安装 Cassandra 1.2.3,我之前使用的是 tarball 1.1.7 安装。安装后,我将 cassandra.yaml 中的分区器从 Murmur3Partitioner 更改为 RandomPartitioner,如下所示:

分区器:org.apache.cassandra.dht.RandomPartitioner

然后在开始我看到不兼容的系统键空间错误如下:

错误 18:22:11,465 无法打开/var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ib-1;分区器 org.apache.cassandra.dht.Murmur3Partitioner 与系统分区器 org.apache.cassandra.dht.RandomPartitioner 不匹配。请注意,从 Cassandra 1.2 开始的默认分区程序是 Murmur3Partitioner,因此如果升级,您需要对其进行编辑以匹配您的旧分区程序。
返回值为 1 的服务退出

如何将系统 key 空间设置为 RandomPartitioner?我已经尝试清除数据文件夹,apt-get remove,也 apt-get purge 然后重新安装,更改为 RandomPartitioner 然后启动 cassandra 但它仍然失败。我也在我的 ubuntu 桌面上复制了这个,所以我想我在这里做错了什么。

任何帮助表示赞赏!

干杯

山姆

最佳答案

一旦 Cassandra 首次启动,就无法更改分区程序。此错误显示数据目录已使用 Murmur3Partitioner 初始化,但您使用 RandomPartitioner 启动它。

如果您尝试从 1.1 安装升级您的数据,Cassandra 没有从正确的位置读取数据。调整你的数据目录以使用你的 1.1 目录,它应该从 partitioner 设置为 RandomPartitioner 开始。

如果您尝试从无数据开始,请停止 Cassandra,删除/var/lib/cassandra/* 并重新启动它。请注意,您需要删除 commitlog 目录以及数据目录。

关于Cassandra RandomPartitioner 版本 1.2.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15865710/

相关文章:

Cassandra CLUSTERING ORDER BY 不起作用并显示正确的结果

java - 为什么最新版本的 apache-cassandra-X.X.X.jar 中没有 CqlStorage 类

replication - Cassandra 数据复制问题

solr - 如何在 cassandra 中选择行以在 solr 中建立索引

python - Python 中的大型 Web 数据集 - 如何处理非常大的数组?

cassandra - 在 Datastax Cassandra CQL 驱动程序中的 IN 子句中使用集合的预处理语句

testing - 如何在用户配置文件模式下正确使用 cassandra-stress 工具?

unit-testing - JUnit 使用嵌入式服务器测试 Cassandra

cassandra - 无法从我的图形实例中看到我的顶点和边,但能够从其他图形实例中看到

java - 从 UUID.toString() 重新创建 UUID