From user-return-18428-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Tue Jul 5 00:58:49 2011 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 A9C16653E for ; Tue, 5 Jul 2011 00:58:49 +0000 (UTC) Received: (qmail 19241 invoked by uid 500); 5 Jul 2011 00:58:47 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 19173 invoked by uid 500); 5 Jul 2011 00:58:46 -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 19164 invoked by uid 99); 5 Jul 2011 00:58:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2011 00:58:46 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a51.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2011 00:58:41 +0000 Received: from homiemail-a51.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a51.g.dreamhost.com (Postfix) with ESMTP id 5D14B2E8062 for ; Mon, 4 Jul 2011 17:58:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=eFO61Lp9N8 YW0IdL6a5nmgof7AFL3wT6OMfWswz8AlV6IJ0BkAAECV1WwGZ7Vs4x6K5qiRV8sI bWe7E4xZXHNrr9t/Tf8mwgONg6dNfDGlTkGMSuR79pzcv//he+DwASEFGetI62W/ eka/obe7hDbi4njtMV1xiumP9tAH0d1yc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=WxC9mP6MWjbRFQYM uh9GJz57riY=; b=2bSElMhR/14eQ9eWZiXTJxmeSasgGsyxEPhjpiwZvkzoadYX feBjBy5sXfLAkqkLgoAJ6YBYj5XuL0dFM6lVckH+S5l3Bn1nOlel9cKKNJ5n8TFZ fsJjp1YbEyCi377O+631CMoS+SZ4uu3IfFjiRIbazDf0IztNxeTxgP8qM68= Received: from [198.48.1.41] (198-48-1-41-dhcp.cafenet.co.nz [198.48.1.41]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a51.g.dreamhost.com (Postfix) with ESMTPSA id 227262E805C for ; Mon, 4 Jul 2011 17:58:13 -0700 (PDT) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-9-807803299 Subject: Re: copy data from multi-node cluster to single node Date: Tue, 5 Jul 2011 12:58:04 +1200 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: X-Mailer: Apple Mail (2.1084) --Apple-Mail-9-807803299 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > How do you change the name of a cluster? The FAQ instructions do not = seem to work for me - are they still valid for 0.7.5? > Is the backup / restore mechanism going to work, or is there a = better/simpler to copy data from multi-node to single-node? Bug fixed on 0.7.6 = https://github.com/apache/cassandra/blob/cassandra-0.7.6-2/CHANGES.txt#L21= Also you should move to 0.7.6 to get the Gossip fix = https://github.com/apache/cassandra/blob/cassandra-0.7.6-2/CHANGES.txt#L6 When it comes to moving the data back to a single node I would: - run repair - snapshot prod node - clear all data including the system KS data from the dev node - copy the snapshot data for only your KS to the dev node into the = correct directory, e.g. data/ .=20 - start the dev node - add your KS, the node will now load the data Ignoring the system data means the dev node can sort it's cluster name = and token out using the yaml file.=20 Even with 3 nodes and RF 3 it's impossible to ever say that one node has = a complete copy of the data. Running repair will make it more likely, = but the node could drop a mutation message during the repair or drop off = gossip for few seconds. If you really want to have *everything* from the = prod cluster then copy the data from all 3 nodes onto the dev node and = compact it down.=20 Hope that helps.=20 =20 ----------------- Aaron Morton Freelance Cassandra Developer @aaronmorton http://www.thelastpickle.com On 5 Jul 2011, at 03:05, Ross Black wrote: > Hi, >=20 > I am using Cassandra 0.7.5 on Linux machines. >=20 > I am trying to backup data from a multi-node cluster (3 nodes) and = restore it into a single node cluster that has a different name (for = development testing). >=20 > The multi-node cluster is backed up using clustertool global_snapshot, = and then I copy the snapshot from a single node and replace the data = directory in the single node. > The multi-node cluster has a replication factor of 3, so I assume that = restoring any node from the multi-node cluster will be the same. > When started up this fails with a node name mismatch. >=20 > I have tried removing all the Location* files in the data directory = (as per http://wiki.apache.org/cassandra/FAQ#clustername_mismatch) but = the single node then fails with an error message: > org.apache.cassandra.config.ConfigurationException: Found system table = files, but they couldn't be loaded. Did you change the partitioner? >=20 >=20 > How do you change the name of a cluster? The FAQ instructions do not = seem to work for me - are they still valid for 0.7.5? > Is the backup / restore mechanism going to work, or is there a = better/simpler to copy data from multi-node to single-node? >=20 > Thanks, > Ross >=20 --Apple-Mail-9-807803299 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii How do you change the name of a = cluster?  The FAQ instructions do not seem to work for me - are = they still valid for 0.7.5?
Is the backup / restore mechanism going = to work, or is there a better/simpler to copy data from multi-node to = single-node?

Also you should move to 0.7.6 to get the Gossip = fix https://github.com/apache/cassandra/blob/cassandra-0.7.6-2/CHANGE= S.txt#L6

When it comes to moving the data back to a single node I = would:
- run repair
- snapshot prod node
- = clear all data including the system KS data from the dev = node
- copy the snapshot data for only your KS to the dev node = into the correct directory, e.g. data/<my-keyspace> = . 
- start the dev node
- add your KS, the node = will now load the data

Ignoring the system data = means the dev node can sort it's cluster name and token out using the = yaml file. 

Even with 3 nodes and RF 3 = it's impossible to ever say that one node has a complete copy of the = data. Running repair will make it more likely, but the node could drop a = mutation message during the repair or drop off gossip for few seconds. = If you really want to have *everything* from the prod cluster then copy = the data from all 3 nodes onto the dev node and compact it = down. 

Hope that = helps. 
  
http://www.thelastpickle.com

On 5 Jul 2011, at 03:05, Ross Black wrote:

Hi,

I= am using Cassandra 0.7.5 on Linux machines.

I am trying to = backup data from a multi-node cluster (3 nodes) and restore it into a = single node cluster that has a different name (for development = testing).

The multi-node cluster is backed up using clustertool = global_snapshot, and then I copy the snapshot from a single node and = replace the data directory in the single node.
The multi-node cluster = has a replication factor of 3, so I assume that=20 restoring any node from the multi-node cluster will be the same.
When started up this fails with a node name mismatch.

I have = tried removing all the Location* files in the data directory (as per http://= wiki.apache.org/cassandra/FAQ#clustername_mismatch) but the single = node then fails with an error message:
org.apache.cassandra.config.ConfigurationException: Found system table = files, but they couldn't be loaded. Did you change the = partitioner?


How do you change the name of a cluster?  = The FAQ instructions do not seem to work for me - are they still valid = for 0.7.5?
Is the backup / restore mechanism going to work, or is there a = better/simpler to copy data from multi-node to = single-node?

Thanks,
Ross


= --Apple-Mail-9-807803299--