|What’s the cardinality of hash? |
Do they have the same schema? If so you may be able to take a snapshot and hardlink it in / refresh instead of sstableloader. Alternatively you could drop the index from the destination keyspace and add it back in after the load finishes.
How big are the sstables? How big is your heap? Are you already serving traffic?
What does “hash” Data look like?
On Jul 24, 2018, 11:30 AM -0400, Arpan Khandelwal <arpan.ps@xxxxxxxxx
I need to clone data from one keyspace to another keyspace.
We do it by taking snapshot of keyspace1 and restoring in keyspace2 using sstableloader.
Suppose we have following table with index on hash column. Table has around 10M rows.
CREATE TABLE message (
PRIMARY KEY ( (id) )
CREATE INDEX ON message ( hash );
Cassandra crashes when i load data using sstableloader. Load is happening correctly but seems that cassandra crashes when its trying to build index on table with huge data.
I have two questions.
1. Is there any better way to clone keyspace?
2. How can i optimize sstableloader to load data and not crash cassandra while building index.