cassandra 在更改分区程序后不启动
cassandra dont start after change partitioner
我更改了 cassandra 分区程序。默认分区程序是 Murmur3Partitioner。我编辑 cassandra.yaml 并将分区程序更改为 ByteOrderedPartitioner,以便在分区键上使用 >、>=、<= 和 < 运算符。
但是在使用以下命令停止然后启动服务后:
sudo service dse stop
sudo nano /etc/dse/cassandra/cassandra.yaml
sudo service dse start
DSE 无法启动并在终端中显示以下行:
Job for dse.service failed because the control process exited with error code. See "systemctl status dse.service" and "journalctl -xe" for details.
而 cassandra 日志是:
ERROR [SSTableBatchOpen:2] 2018-04-24 00:54:10,498 SSTableReader.java:511 - Cannot open /var/lib/cassandra/data/system/local-7ad54392bcdd35a6174e047860b377/mc-252-big; partitioner org.apache.cassandra.dht.Murmur3Partitioner does not match system partitioner org.apache.cassandra.dht.ByteOrderedPartitioner. Note that the default partitioner starting with Cassandra 1.2 is Murmur3Partitioner, so you will need to edit that to match your old partitioner if upgrading.
您不能更改分区程序。那是完全不受支持的。
为此,您需要使用 ByteOrderedPartitioner 分区程序创建一个新集群,在将数据从旧数据复制到新数据的同时写入两者。一旦所有数据都被复制并从旧的切换到新的读取。
我强烈建议不要使用 ByteOrderedPartitioner,相反,您应该尝试稍微更改数据模型以在单个分区内获取所有 >、>=、<= 和 < 操作,否则您可能 运行 进入性能问题。尽量避免遇到多个分区的范围查询,否则协调器上的工作将变得更糟,并且延迟会增加。 BOP 适用于非常具体的用例,而不是一般用途。
我更改了 cassandra 分区程序。默认分区程序是 Murmur3Partitioner。我编辑 cassandra.yaml 并将分区程序更改为 ByteOrderedPartitioner,以便在分区键上使用 >、>=、<= 和 < 运算符。
但是在使用以下命令停止然后启动服务后:
sudo service dse stop
sudo nano /etc/dse/cassandra/cassandra.yaml
sudo service dse start
DSE 无法启动并在终端中显示以下行:
Job for dse.service failed because the control process exited with error code. See "systemctl status dse.service" and "journalctl -xe" for details.
而 cassandra 日志是:
ERROR [SSTableBatchOpen:2] 2018-04-24 00:54:10,498 SSTableReader.java:511 - Cannot open /var/lib/cassandra/data/system/local-7ad54392bcdd35a6174e047860b377/mc-252-big; partitioner org.apache.cassandra.dht.Murmur3Partitioner does not match system partitioner org.apache.cassandra.dht.ByteOrderedPartitioner. Note that the default partitioner starting with Cassandra 1.2 is Murmur3Partitioner, so you will need to edit that to match your old partitioner if upgrading.
您不能更改分区程序。那是完全不受支持的。
为此,您需要使用 ByteOrderedPartitioner 分区程序创建一个新集群,在将数据从旧数据复制到新数据的同时写入两者。一旦所有数据都被复制并从旧的切换到新的读取。
我强烈建议不要使用 ByteOrderedPartitioner,相反,您应该尝试稍微更改数据模型以在单个分区内获取所有 >、>=、<= 和 < 操作,否则您可能 运行 进入性能问题。尽量避免遇到多个分区的范围查询,否则协调器上的工作将变得更糟,并且延迟会增加。 BOP 适用于非常具体的用例,而不是一般用途。