Wednesday, December 12, 2018

How to delete large partitions (Wide Partition) based on Partition.

Follow below steps:

Step 1: Find the partition key from system.log file

Step 2: Check which node the key exists with command
nodetool getendpoints -key

Step 3: Now we have to retrieve the record from sstable. There are two steps for this.
a) Finding which sstable the key is located: nodetool getsstables -key
b) Export the sstable to JSON format to view the problematic key: 
bin/sstable2json SSTABLE[-K KEY [-k KEY [... ]]]] [-x KEY [-x KEY [... ]]] [-e ]

Then solution,

DELETE from table where column='partition key'

***

No comments:

Post a Comment