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 A4FC21038B for ; Fri, 12 Jul 2013 08:10:11 +0000 (UTC) Received: (qmail 54833 invoked by uid 500); 12 Jul 2013 08:10:09 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 54793 invoked by uid 500); 12 Jul 2013 08:10:08 -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 54785 invoked by uid 99); 12 Jul 2013 08:10:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jul 2013 08:10:08 +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-a45.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jul 2013 08:10:03 +0000 Received: from homiemail-a45.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a45.g.dreamhost.com (Postfix) with ESMTP id 2DD1F480C2 for ; Fri, 12 Jul 2013 01:09:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :content-type:message-id:mime-version:subject:date:references:to :in-reply-to; s=thelastpickle.com; bh=GDO3lpKyYw/xxugFaZs6k8C8N4 Y=; b=Fl9PqBSTcKwTnXzuxtJE89zAE+nOEDlCud44eYKP5BZyp26XP3SuDD4263 WS85QTX74xkc26bsYPqV1bJrf45S/767lpALweYOBNNy6r2mSWP+6t37XkeZLrPb OIM9WsZ0lf9GWc3fCJ1SxNaTar78yh2s4CMOFlKMnFpXUyJGo= Received: from [172.16.1.7] (unknown [203.86.207.101]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a45.g.dreamhost.com (Postfix) with ESMTPSA id 9A876480BE for ; Fri, 12 Jul 2013 01:09:42 -0700 (PDT) From: aaron morton Content-Type: multipart/alternative; boundary="Apple-Mail=_F0F7488B-6A9C-421E-A0B6-4BBADE52CB94" Message-Id: Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Node tokens / data move Date: Fri, 12 Jul 2013 20:09:41 +1200 References: To: user@cassandra.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1508) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_F0F7488B-6A9C-421E-A0B6-4BBADE52CB94 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 > Can he not specify all 256 tokens in the YAML of the new = cluster and then copy sstables?=20 > I know it is a bit ugly but should work. You can pass a comma separated list of tokens to the = -Dcassandra.replace_token JVM param.=20 AFAIK it's not possible to provide the list in the yaml file.=20 Cheers A ----------------- Aaron Morton Cassandra Consultant New Zealand @aaronmorton http://www.thelastpickle.com On 11/07/2013, at 5:07 AM, Baskar Duraikannu = wrote: >=20 > I copied the sstables and then ran a repair. It worked. Looks like = export and import may have been much faster given that we had very = little data. >=20 > Thanks everyone. >=20 >=20 >=20 >=20 > On Tue, Jul 9, 2013 at 1:34 PM, sankalp kohli = wrote: > Hi Aaron, > Can he not specify all 256 tokens in the YAML of the new = cluster and then copy sstables?=20 > I know it is a bit ugly but should work. >=20 > Sankalp >=20 >=20 > On Tue, Jul 9, 2013 at 3:19 AM, Baskar Duraikannu = wrote: > Thanks Aaron >=20 > On 7/9/13, aaron morton wrote: > >> Can I just copy data files for the required keyspaces, create = schema > >> manually and run repair? > > If you have something like RF 3 and 3 nodes then yes, you can copy = the data > > from one node in the source cluster to all nodes in the dest cluster = and use > > cleanup to remove the unneeded data. Because each node in the source = cluster > > has a full copy of the data. > > > > If that's not the case you cannot copy the data files, even if they = have the > > same number of nodes, because the nodes in the dest cluster will = have > > different tokens. AFAIK you need to export the full data set from = the source > > DC and then import it into the dest system. > > > > The Bulk Load utility may be of help > > http://www.datastax.com/docs/1.2/references/bulkloader . You could = copy the > > SSTables from every node in the source system and bulk load them = into the > > dest system. That process will ensure rows are sent to nodes that = are > > replicas. > > > > Cheers > > > > ----------------- > > Aaron Morton > > Freelance Cassandra Consultant > > New Zealand > > > > @aaronmorton > > http://www.thelastpickle.com > > > > On 9/07/2013, at 12:45 PM, Baskar Duraikannu > > wrote: > > > >> We have two clusters used by two different groups with vnodes = enabled. Now > >> there is a need to move some of the keyspaces from cluster 1 to = cluster 2. > >> > >> > >> Can I just copy data files for the required keyspaces, create = schema > >> manually and run repair? > >> > >> Anything else required? Please help. > >> -- > >> Thanks, > >> Baskar Duraikannu > > > > >=20 >=20 --Apple-Mail=_F0F7488B-6A9C-421E-A0B6-4BBADE52CB94 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1
      =        Can he not specify all 256 tokens in the YAML = of the new cluster and then copy sstables? 
I know it is = a bit ugly but should = work.
You can pass a = comma separated list of tokens to the -Dcassandra.replace_token JVM = param. 

AFAIK it's not possible to provide the = list in the yaml = file. 

Cheers
A

http://www.thelastpickle.com

On 11/07/2013, at 5:07 AM, Baskar Duraikannu <baskar.duraikannu.db@gmail.= com> wrote:


I copied the sstables and then ran = a repair. It worked. Looks like export and import may have been much = faster given that we had very little data.

Thanks everyone.




On Tue, Jul 9, = 2013 at 1:34 PM, sankalp kohli <kohlisankalp@gmail.com> wrote:
Hi Aaron,
        =      Can he not specify all 256 tokens in the YAML of the = new cluster and then copy sstables? 
I know it is a bit ugly but should work.

Sankalp


On Tue, Jul 9, 2013 at 3:19 AM, Baskar Duraikannu = <baskar.duraikannu.db@gmail.com> = wrote:
Thanks Aaron

On 7/9/13, aaron morton <aaron@thelastpickle.com> wrote:
>> Can I just copy data files for the required keyspaces, create = schema
>> manually and run repair?
> If you have something like RF 3 and 3 nodes then yes, you can copy = the data
> from one node in the source cluster to all nodes in the dest = cluster and use
> cleanup to remove the unneeded data. Because each node in the = source cluster
> has a full copy of the data.
>
> If that's not the case you cannot copy the data files, even if they = have the
> same number of nodes, because the nodes in the dest cluster will = have
> different tokens. AFAIK you need to export the full data set from = the source
> DC and then import it into the dest system.
>
> The Bulk Load utility may be of help
> http://www.datastax.com/docs/1.2/references/bulkloader . You could copy the
> SSTables from every node in the source system and bulk load them = into the
> dest system. That process will ensure rows are sent to nodes that = are
> replicas.
>
> Cheers
>
> -----------------
> Aaron Morton
> Freelance Cassandra Consultant
> New Zealand
>
> @aaronmorton
>
http://www.thelastpickle.com
>
> On 9/07/2013, at 12:45 PM, Baskar Duraikannu
> <baskar.duraikannu.db@gmail.com> wrote:
>
>> We have two clusters used by two different groups with vnodes = enabled. Now
>> there is a need to move some of the keyspaces from cluster 1 to = cluster 2.
>>
>>
>> Can I just copy data files for the required keyspaces, create = schema
>> manually and run repair?
>>
>> Anything else required?  Please help.
>> --
>> Thanks,
>> Baskar Duraikannu
>
>



= --Apple-Mail=_F0F7488B-6A9C-421E-A0B6-4BBADE52CB94--