Reputation: 284
i use Cassandra 3.4 on some centos 7 machines.
I have 2 clusters:
Cluster 1 with 2 DC , DC1 has 2 machines 192.168.0.171/192.168.172, DC2 has 1 machine 192.168.0.173. Cluster 1 has some data on it, on one keyspace with replication 2 : 1.
Cluster 2 with 1 datacenter , DC3 has 2 machines. 192.168.0.174/192.168.0.175.
On second cluster, DC3, I create the keyspace : "keyspace1" with NetworkTopologyStrategy : DC3 : 2.
Streamed some cassandra-stress on 192.168.0.175 :
cassandra-stress write n=1000000 -node 192.168.0.175.
In this moment cassandra-stress should generate some garbage data.
Checked the /var/lib/cassandra/data/keyspace1/standard1-97a771600d4011e69a5a13282caaa658 and there i have some ma-1-big-Data.db 57 Mb, ma-2-big-Data.db 65 Mb, ma-3-big-Data.db 65 Mb.
My question :
Let`s assume the garbage data is actual data and i want to stream from Cluster 2 this data into Cluster 1. How can i do that by using sstableloader?
NOTE: Please give, if possible, example with commands ( i`m quite newbie in domain :( )
Upvotes: 2
Views: 2429
Reputation: 384
bin/sstableloader -d 192.168.0.171,192.168.172 /var/lib/cassandra/data/keyspace1/standard1-97a771600d4011e69a5a13282caaa658
this command will load data from one cluster to another cluster
Note: keyspace and table should exist in both clusters, and the tables should have the same schema.
Upvotes: 5