cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Coli <rc...@eventbrite.com>
Subject Re: Rename Keyspace offline
Date Wed, 27 Jan 2016 18:58:40 GMT
On Wed, Jan 27, 2016 at 6:49 AM, Jean Tremblay <
jean.tremblay@zen-innovations.com> wrote:

> Since it takes me 2 days to load my data, I was planning to load the new
> set on a new keyspace (KS-Y), and when loaded drop KS-X and rename KS-Y to
> KS-X.
>

Why bother with the rename? Just have two keyspaces, foo and foo_, and
alternate your bulk loads between truncating them?


> Would this procedure work to destroy an old keyspace KS-X and rename a new
> keyspace KS-Y to KS-X:
>

Yes, if you include :

0) Load schema for KS-Y into KS-X

1) nodetool drain each node.
> 2) stop cassandra on each node.
> 3) on each node:
>         3.1) rm -r data/KS-X
>         3.2) mv data/KS-Y data/KS-X
> 4) restart each node.
>

Note also that in step 3.2, the uuid component of file and/or directory
names will have to be changed.

=Rob

Mime
View raw message