[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cassandra-user
Subject:    Re: Rename Keyspace offline
From:       Jean Tremblay <jean.tremblay () zen-innovations ! com>
Date:       2016-01-28 19:18:38
Message-ID: 69B8A654-4EE0-443E-88F8-42AF8126F9A0 () zen-innovations ! com
[Download RAW message or body]

Thank you all for your replies.
My main objective was not to change my client.
After your answers it makes a lot of sense to modify my client in a way to make it \
accept different key space name. This way I will no longer need to rename a key space \
I simply need to develop a way to tell my client that there is a new key space.

Thanks again for your feedback
Jean

On 27 Jan,2016, at 19:58, Robert Coli \
<rcoli@eventbrite.com<mailto:rcoli@eventbrite.com>> wrote:

On Wed, Jan 27, 2016 at 6:49 AM, Jean Tremblay \
<jean.tremblay@zen-innovations.com<mailto: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


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body dir="auto">
<div></div>
<div>Thank you all for your replies.</div>
<div>My main objective was not to change my client.</div>
<div>After your answers it makes a lot of sense to modify my client in a way to make \
it accept different key space name. This way I will no longer need to rename a key \
space I simply need to develop a way to tell my client that there is a new key \
space.&nbsp;</div> <div><br>
</div>
<div>Thanks again for your feedback</div>
<div>Jean</div>
<div><br>
On 27 Jan,2016, at 19:58, Robert Coli &lt;<a \
href="mailto:rcoli@eventbrite.com">rcoli@eventbrite.com</a>&gt; wrote:<br> <br>
</div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Wed, Jan 27, 2016 at 6:49 AM, Jean Tremblay <span \
dir="ltr"> &lt;<a href="mailto:jean.tremblay@zen-innovations.com" \
target="_blank">jean.tremblay@zen-innovations.com</a>&gt;</span> wrote:<br> \
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> 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.<br> </blockquote>
<div><br>
</div>
<div>Why bother with the rename? Just have two keyspaces, foo and foo_, and alternate \
your bulk loads between truncating them?</div> <div>&nbsp;</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Would this procedure work to destroy an old keyspace KS-X \
and rename a new keyspace KS-Y to KS-X:<br> </blockquote>
<div><br>
</div>
<div>Yes, if you include :</div>
<div>&nbsp;</div>
<div>0) Load schema for KS-Y into KS-X&nbsp;</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> 1) nodetool drain each node.<br>
2) stop cassandra on each node.<br>
3) on each node:<br>
&nbsp; &nbsp; &nbsp; &nbsp; 3.1) rm -r data/KS-X<br>
&nbsp; &nbsp; &nbsp; &nbsp; 3.2) mv data/KS-Y data/KS-X<br>
4) restart each node.<br>
</blockquote>
<div><br>
</div>
<div>Note also that in step 3.2, the uuid component of file and/or directory names \
will have to be changed.</div> <div><br>
</div>
<div>=Rob</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic