From user-return-31047-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Fri Jan 11 21:26:51 2013 Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 87A92E15E for ; Fri, 11 Jan 2013 21:26:51 +0000 (UTC) Received: (qmail 86436 invoked by uid 500); 11 Jan 2013 21:26:48 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 86384 invoked by uid 500); 11 Jan 2013 21:26:48 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 86375 invoked by uid 99); 11 Jan 2013 21:26:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 21:26:48 +0000 X-ASF-Spam-Status: No, hits=2.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of asf11@outlook.com designates 65.54.190.159 as permitted sender) Received: from [65.54.190.159] (HELO bay0-omc3-s21.bay0.hotmail.com) (65.54.190.159) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 21:26:42 +0000 Received: from BAY002-W112 ([65.54.190.188]) by bay0-omc3-s21.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 11 Jan 2013 13:26:19 -0800 X-EIP: [LKflTAYswlmGe/XbZXPZjph/QpmKsW3c] X-Originating-Email: [asf11@outlook.com] Message-ID: Content-Type: multipart/alternative; boundary="_8c4ce511-488c-4255-950c-c9363b93d9cb_" From: S C To: "user@cassandra.apache.org" Subject: RE: change cluster name retaining keypsace Date: Fri, 11 Jan 2013 15:26:19 -0600 Importance: Normal In-Reply-To: References: , MIME-Version: 1.0 X-OriginalArrivalTime: 11 Jan 2013 21:26:19.0497 (UTC) FILETIME=[4BDE2590:01CDF042] X-Virus-Checked: Checked by ClamAV on apache.org --_8c4ce511-488c-4255-950c-c9363b93d9cb_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Aaron=2C Can this also be considered? Connect to node using cassandra-cliuse system=3Bset LocationInfo[utf8('L')]= [utf8('ClusterName')]=3Dutf8('')=3Bexit=3BRun nodetool fl= ush on the nodeUpdate cassandra.yaml file with new cluster_nameRestart node= . Thanks=2CSC From: aaron@thelastpickle.com Subject: Re: change cluster name retaining keypsace Date: Thu=2C 10 Jan 2013 13:21:28 +1300 To: user@cassandra.apache.org To change the cluster name: 1) Stop all nodes. 2) Delete or move the LocationInfo sstables from /var/l= og/cassandra/data/system/LocationInfo3) Change the cluster_name in cassandr= a.yaml4) Restart the nodes.=20 You cannot do an incremental change of the cluster name. All nodes in the c= luster must have the same name.=20 By only deleting the LocationInfo CF your schema will be preserved. You do = not have to move / delete any of the user data.=20 Hope that helps.=20 =0A= -----------------Aaron MortonFreelance Cassandra DeveloperNew Zealand @aaronmortonhttp://www.thelastpickle.com=0A= =0A= =0A= On 10/01/2013=2C at 6:50 AM=2C Tim Dunphy wrote:Hell= o=2C I'm attempting to change my cluster name=2C yet retain my keyspace as it w= as. I know from what I've read that this requires changing it within the ca= ssandra cli (using system)=2C changing it in the cassandra.yaml file=2C and= deleting the contents of the /var/lib/cassandra/data/system directory. The= n restart cassandra. =0A= This does work. I am able to change my cluster name this way. But of cour= se=2C since I deleted my system information I have lost all reference to my= keyspace. My app does not work and a show keyspaces within the cassandra-c= li does not show the keyspace. This does make a certain amount of sense to = me as I realize that the system kesyspace directory does contain informatio= n on the keyspaces within this cassandra node.=0A= So what I did was create a snapshot of my keyspace (joke_fire1) with the c= ommand nodetool -h localhost -p 7199 joke_fire1. I then re-create the keyspace within the cassandra cli and copy just the .*= db files back to the keyspace directory. But that doesn't work a describe k= eyspace does not show my column families and my app doesn't work. =0A= I even tried creating a tar archive of the keyspace directory and then rsyn= cing the entire contents of the tar archive to the keyspace directory after= creating the keyspace with the same name in the casssandra-cli. Still no g= ood.=0A= I was wondering if I could get some advice on how to change my cluster name= and yet either retain or restore from backup properly my keyspace as it wa= s before the cluster name change.=20 =0A= I tried following the backup and restore advice from both this guide: http://jonathanhui.com/cassandra-data-maintenance-backup-and-system-recover= y=0A= And this guide: http://www.datastax.com/docs/1.1/operations/backup_restore I'm running cassandra 1.1.8.=0A= ThanksTim --=20 GPG me!! gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B =0A= =0A= = --_8c4ce511-488c-4255-950c-c9363b93d9cb_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Aaron=2C

Can = this also be considered?

  1. Connect to node using cassandra-cli
  2. use system=3B
  3. set LocationInfo[utf8('L')][utf8('ClusterName')]=3Dutf8('= <=3Bnew cluster name>=3B')=3B
  4. exit=3B
  5. Run = =3Bnodetool flush on the node
  6. Update cassandra.yaml file with new cluster_name
  7. Restart node.

<= /div>
Thanks=2C
SC


From: aaron@thelastpickle.com
Sub= ject: Re: change cluster name retaining keypsace
Date: Thu=2C 10 Jan 201= 3 13:21:28 +1300
To: user@cassandra.apache.org

To change the clus= ter name:

1) Stop all nodes. =3B
2) Delete=  =3Bor move the =3BLocationInfo sstables from /var/log/cassandra/d= ata/system/LocationInfo
3) Change the cluster_name in cassandra.y= aml
4) Restart the nodes. =3B

You ca= nnot do an incremental change of the cluster name. All nodes in the cluster= must have the same name. =3B

By only deleting= the LocationInfo CF your schema will be preserved. You do not have to move= / delete any of the user data. =3B

Hope that = helps. =3B

=0A=
-----------------
=
Aaron Morton
Freelance Cassandra Developer
New Zea= land

@aaronmorton
=
=0A=
=0A= =0A=
On 10/01/2013=2C at 6:50 AM=2C Tim Dunphy <=3Bbluethundr@gmail.com>=3B wrote:

Hello=2C

 =3BI'm attempting to change my cluster name=2C yet retain my keyspa= ce as it was. I know from what I've read that this requires changing it wit= hin the cassandra cli (using system)=2C changing it in the cassandra.yaml f= ile=2C and deleting the contents of the /var/lib/cassandra/data/system dire= ctory. Then restart cassandra. =3B
=0A=
 =3B
 =3BThis does work. I am able to change my clus= ter name this way. But of course=2C since I deleted my system information I= have lost all reference to my keyspace. My app does not work and a show ke= yspaces within the cassandra-cli does not show the keyspace. This does make= a certain amount of sense to me as I realize that the system kesyspace dir= ectory does contain information on the keyspaces within this cassandra node= .
=0A=

So what I did was create a snapshot of my keyspace (jok= e_fire1)  =3Bwith the command =3Bnodetool -h localhost -p 7199 joke= _fire1.

I then re-create the keyspace within the c= assandra cli and copy just the .*db files back to the keyspace directory. B= ut that doesn't work a describe keyspace does not show my column families a= nd my app doesn't work. =3B
=0A=

I even tried creating a tar archive of the keyspace dir= ectory and then rsyncing the entire contents of the tar archive to the keys= pace directory after creating the keyspace with the same name in the casssa= ndra-cli. Still no good.
=0A=

I was wondering if I could get some advice on how to ch= ange my cluster name and yet either retain or restore from backup properly = my keyspace as it was before the cluster name change. =3B
=0A=
I tried following the backup and restore advice from both this guide:<= /div>

=0A=

And this guide:

I'm running cassandra 1.1.8.
=0A=

Thanks
Tim

--
GP= G me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

= =0A=
=0A=

= --_8c4ce511-488c-4255-950c-c9363b93d9cb_--