Re: Migrating data from 2 node cluster to a 3 node cluster

2013-07-09 Thread Ananth Gundabattula
Hello everybody,

The thread below makes me wonder Does RF matter when using sstable loader.?  
My assumption was that stable loader will take care of RF when the streaming is 
done but just wanted to cross check. We are currently moving data from a RF=1 
to RF=3 cluster by using sstable loader tool. We will of course be running 
repair on the destination nodes but was wondering how is the following issue 
resolved using a repair if my understanding is wrong?

If the above assumption is wrong and since we are using Sstableloader which 
streams relevant parts to of each table to the destination cluster, it means 
the destination folder will only get one copy only (because origin RF =1 ) ? If 
that is the case, how will a repair resolve when a data chunk from an empty 
folder is used as the chosen replica to perform repair  ( as it possible that  
two nearest neighbors are empty in the first place ) .

Regards,
Ananth



From: aaron morton aa...@thelastpickle.commailto:aa...@thelastpickle.com
Reply-To: user@cassandra.apache.orgmailto:user@cassandra.apache.org 
user@cassandra.apache.orgmailto:user@cassandra.apache.org
Date: Tuesday, July 9, 2013 3:24 PM
To: user@cassandra.apache.orgmailto:user@cassandra.apache.org 
user@cassandra.apache.orgmailto:user@cassandra.apache.org
Subject: Re: Migrating data from 2 node cluster to a 3 node cluster

Without vnodes the initial_token is stored in the yaml file, as well as the 
system LocationInfo CF.

With vnodes the only place the tokens are stored is in the system KS. So moving 
a node without it's system KS will cause it to generate new ones which will 
mean data is moved around.

Cheers

-
Aaron Morton
Freelance Cassandra Consultant
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 9/07/2013, at 11:23 AM, sankalp kohli 
kohlisank...@gmail.commailto:kohlisank...@gmail.com wrote:

Leaving the system keyspaces behind is OK if you are not using vnodes. 

Why is it different for vnodes?


On Mon, Jul 8, 2013 at 3:37 PM, aaron morton 
aa...@thelastpickle.commailto:aa...@thelastpickle.com wrote:
This might work for user created keyspaces but might not work for system 
keyspace
Leaving the system keyspaces behind is OK if you are not using vnodes.

Cheers

-
Aaron Morton
Freelance Cassandra Consultant
New Zealand

@aaronmorton
http://www.thelastpickle.comhttp://www.thelastpickle.com/

On 9/07/2013, at 10:03 AM, sankalp kohli 
kohlisank...@gmail.commailto:kohlisank...@gmail.com wrote:

If RF=N or RFN, you can just copy all SStables to all nodes, watching out for 
name collision.

This might work for user created keyspaces but might not work for system 
keyspace


On Mon, Jul 8, 2013 at 2:07 PM, Robert Coli 
rc...@eventbrite.commailto:rc...@eventbrite.com wrote:
On Fri, Jul 5, 2013 at 7:54 PM, srmore 
comom...@gmail.commailto:comom...@gmail.com wrote:
RF of old and new cluster is the same RF=3. Keyspaces and schema info is also 
same.

You have a cluster where RF=3 and N=2? Does it.. work?

What are the tokens of old and new nodes?
tokens for old cluster ( 2-node )

If RF=N or RFN, you can just copy all SStables to all nodes, watching out for 
name collision.

=Rob







Re: Migrating data from 2 node cluster to a 3 node cluster

2013-07-09 Thread Robert Coli
On Tue, Jul 9, 2013 at 12:36 AM, Ananth Gundabattula 
agundabatt...@threatmetrix.com wrote:

 The thread below makes me wonder Does RF matter when using sstable
loader.?  My assumption was that stable loader will take care of RF when
the streaming is done but just wanted to cross check. We are currently
moving data from a RF=1 to RF=3 cluster by using sstable loader tool. We
will of course be running repair on the destination nodes but was wondering
how is the following issue resolved using a repair if my understanding is
wrong?

sstableloader does in fact stream to all endpoints. That's why it's
valuable that it has an --ignores option : if you successfully streamed to
2/3 replicas and 1/3 failed, you can --ignores the 2 which completed.

=Rob


Re: Migrating data from 2 node cluster to a 3 node cluster

2013-07-08 Thread Robert Coli
On Fri, Jul 5, 2013 at 7:54 PM, srmore comom...@gmail.com wrote:

 RF of old and new cluster is the same RF=3. Keyspaces and schema info is
 also same.


You have a cluster where RF=3 and N=2? Does it.. work?

What are the tokens of old and new nodes?

 tokens for old cluster ( 2-node )


If RF=N or RFN, you can just copy all SStables to all nodes, watching out
for name collision.

=Rob


Re: Migrating data from 2 node cluster to a 3 node cluster

2013-07-08 Thread sankalp kohli
If RF=N or RFN, you can just copy all SStables to all nodes, watching out
for name collision.

This might work for user created keyspaces but might not work for system
keyspace


On Mon, Jul 8, 2013 at 2:07 PM, Robert Coli rc...@eventbrite.com wrote:

 On Fri, Jul 5, 2013 at 7:54 PM, srmore comom...@gmail.com wrote:

 RF of old and new cluster is the same RF=3. Keyspaces and schema info is
 also same.


 You have a cluster where RF=3 and N=2? Does it.. work?

  What are the tokens of old and new nodes?

 tokens for old cluster ( 2-node )


 If RF=N or RFN, you can just copy all SStables to all nodes, watching out
 for name collision.

 =Rob




Re: Migrating data from 2 node cluster to a 3 node cluster

2013-07-08 Thread aaron morton
 This might work for user created keyspaces but might not work for system 
 keyspace
Leaving the system keyspaces behind is OK if you are not using vnodes. 

Cheers

-
Aaron Morton
Freelance Cassandra Consultant
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 9/07/2013, at 10:03 AM, sankalp kohli kohlisank...@gmail.com wrote:

 If RF=N or RFN, you can just copy all SStables to all nodes, watching out 
 for name collision.
 
 This might work for user created keyspaces but might not work for system 
 keyspace
 
 
 On Mon, Jul 8, 2013 at 2:07 PM, Robert Coli rc...@eventbrite.com wrote:
 On Fri, Jul 5, 2013 at 7:54 PM, srmore comom...@gmail.com wrote:
 RF of old and new cluster is the same RF=3. Keyspaces and schema info is also 
 same.
 
 You have a cluster where RF=3 and N=2? Does it.. work?
 
 What are the tokens of old and new nodes?
 tokens for old cluster ( 2-node )
 
 If RF=N or RFN, you can just copy all SStables to all nodes, watching out 
 for name collision.
 
 =Rob
 
 



Re: Migrating data from 2 node cluster to a 3 node cluster

2013-07-08 Thread sankalp kohli
Leaving the system keyspaces behind is OK if you are not using vnodes. 

Why is it different for vnodes?


On Mon, Jul 8, 2013 at 3:37 PM, aaron morton aa...@thelastpickle.comwrote:

 This might work for user created keyspaces but might not work for system
 keyspace

 Leaving the system keyspaces behind is OK if you are not using vnodes.

 Cheers

-
 Aaron Morton
 Freelance Cassandra Consultant
 New Zealand

 @aaronmorton
 http://www.thelastpickle.com

 On 9/07/2013, at 10:03 AM, sankalp kohli kohlisank...@gmail.com wrote:

 If RF=N or RFN, you can just copy all SStables to all nodes, watching
 out for name collision.

 This might work for user created keyspaces but might not work for system
 keyspace


 On Mon, Jul 8, 2013 at 2:07 PM, Robert Coli rc...@eventbrite.com wrote:

 On Fri, Jul 5, 2013 at 7:54 PM, srmore comom...@gmail.com wrote:

 RF of old and new cluster is the same RF=3. Keyspaces and schema info is
 also same.


 You have a cluster where RF=3 and N=2? Does it.. work?

  What are the tokens of old and new nodes?

 tokens for old cluster ( 2-node )


 If RF=N or RFN, you can just copy all SStables to all nodes, watching
 out for name collision.

 =Rob






Re: Migrating data from 2 node cluster to a 3 node cluster

2013-07-08 Thread aaron morton
Without vnodes the initial_token is stored in the yaml file, as well as the 
system LocationInfo CF. 

With vnodes the only place the tokens are stored is in the system KS. So moving 
a node without it's system KS will cause it to generate new ones which will 
mean data is moved around. 

Cheers

-
Aaron Morton
Freelance Cassandra Consultant
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 9/07/2013, at 11:23 AM, sankalp kohli kohlisank...@gmail.com wrote:

 Leaving the system keyspaces behind is OK if you are not using vnodes. 
 
 Why is it different for vnodes?
 
 
 On Mon, Jul 8, 2013 at 3:37 PM, aaron morton aa...@thelastpickle.com wrote:
 This might work for user created keyspaces but might not work for system 
 keyspace
 
 Leaving the system keyspaces behind is OK if you are not using vnodes. 
 
 Cheers
 
 -
 Aaron Morton
 Freelance Cassandra Consultant
 New Zealand
 
 @aaronmorton
 http://www.thelastpickle.com
 
 On 9/07/2013, at 10:03 AM, sankalp kohli kohlisank...@gmail.com wrote:
 
 If RF=N or RFN, you can just copy all SStables to all nodes, watching out 
 for name collision.
 
 This might work for user created keyspaces but might not work for system 
 keyspace
 
 
 On Mon, Jul 8, 2013 at 2:07 PM, Robert Coli rc...@eventbrite.com wrote:
 On Fri, Jul 5, 2013 at 7:54 PM, srmore comom...@gmail.com wrote:
 RF of old and new cluster is the same RF=3. Keyspaces and schema info is 
 also same.
 
 You have a cluster where RF=3 and N=2? Does it.. work?
 
 What are the tokens of old and new nodes?
 tokens for old cluster ( 2-node )
 
 If RF=N or RFN, you can just copy all SStables to all nodes, watching out 
 for name collision.
 
 =Rob
 
 
 
 



Re: Migrating data from 2 node cluster to a 3 node cluster

2013-07-05 Thread Robert Coli
On Thu, Jul 4, 2013 at 10:03 AM, srmore comom...@gmail.com wrote:

 We are planning to move data from a 2 node cluster to a 3 node cluster. We
 are planning to copy the data from the two nodes (snapshot) to the new 2
 nodes and hoping that Cassandra will sync it to the third node. Will this
 work ? are there any other commands to run after we are done migrating,
 like nodetool repair.


What RF are old and new cluster?

What are the tokens of old and new nodes?

http://www.palominodb.com/blog/2012/09/25/bulk-loading-options-cassandra

=Rob


Re: Migrating data from 2 node cluster to a 3 node cluster

2013-07-05 Thread srmore
On Fri, Jul 5, 2013 at 6:08 PM, Robert Coli rc...@eventbrite.com wrote:

 On Thu, Jul 4, 2013 at 10:03 AM, srmore comom...@gmail.com wrote:

 We are planning to move data from a 2 node cluster to a 3 node cluster.
 We are planning to copy the data from the two nodes (snapshot) to the new 2
 nodes and hoping that Cassandra will sync it to the third node. Will this
 work ? are there any other commands to run after we are done migrating,
 like nodetool repair.


 What RF are old and new cluster?


RF of old and new cluster is the same RF=3. Keyspaces and schema info is
also same.



 What are the tokens of old and new nodes?

tokens for old cluster ( 2-node )

node 0 -  0
node 1 -  85070591730234615865843651857942052864
Tokens for new cluster (3-node)
node 0 - 0
node 1 - 56713727820156407428984779325531226112
node 2 - 113427455640312814857969558651062452224



 http://www.palominodb.com/blog/2012/09/25/bulk-loading-options-cassandra


Thanks this helps a lot !



 =Rob



Re: Migrating data from 2 node cluster to a 3 node cluster

2013-07-04 Thread Jonathan Haddad
You should run a nodetool repair after you copy the data over.  You could
also use the sstable loader, which would stream the data to the proper node.


On Thu, Jul 4, 2013 at 10:03 AM, srmore comom...@gmail.com wrote:

 We are planning to move data from a 2 node cluster to a 3 node cluster. We
 are planning to copy the data from the two nodes (snapshot) to the new 2
 nodes and hoping that Cassandra will sync it to the third node. Will this
 work ? are there any other commands to run after we are done migrating,
 like nodetool repair.

 Thanks all.




-- 
Jon Haddad
http://www.rustyrazorblade.com
skype: rustyrazorblade