Search code examples
cassandradatastax

cassandra dont start after change partitioner


I change cassandra partitioner. Default partitioner was Murmur3Partitioner. I edit cassandra.yaml and change partitioner to ByteOrderedPartitioner for using the >, >=, <= and < operator on the partition key.

But after stop and then start service with following commands:

sudo service dse stop 
sudo nano /etc/dse/cassandra/cassandra.yaml
sudo service dse start

DSE can not start and display following line in terminal:

Job for dse.service failed because the control process exited with error code. See "systemctl status dse.service" and "journalctl -xe" for details.

And cassandra log is:

ERROR [SSTableBatchOpen:2] 2018-04-24 00:54:10,498  SSTableReader.java:511 - Cannot open /var/lib/cassandra/data/system/local-7ad54392bcdd35a6$84174e047860b377/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.

Solution

  • You cant change the partitioner. Thats completely unsupported.

    In order to do this you would need to create a new cluster with the ByteOrderedPartitioner partitioner, write to both while copying data from old to new. Once all data is copied over switch reads from old to new.

    I would highly recommend not using the ByteOrderedPartitioner, instead you should try to change your data model a bit to get all the >, >=, <= and < operations within a single partition or your gonna likely run into performance issues. Try to avoid range queries where you hit multiple partitions or the work on the coordinator is going to be worse load and latencies will increase. The BOP is for very specific use cases and not general use.