I have a Cassandra and I want to use the cql "IN" query. Therefore I have to change the order of the elements in my composed primary key (only the last piece is available for "IN" queries). The table is quite big but does not span multiple nodes now.
So what I have tried now (which is not working) is the following:
- create a new column family with identical columns but different order of primary key elements
- stop write processes and nodetool flush
- copy all /data/keyspace/columnfamily/ files
- rename the files to match the new column family name
- use the sstable loader to load the files into the new column family
But afterwards the primary key is just messed up:
Failed to decode value '53ccb45d4ab0d3560e8c36fd' (for column 'cent') as int: unpack requires a string argument of length 4
I can also not use COPY ... TO ... because this is just timing out ...
Any ideas?