Re: How does Bootstrapping work in 0.7 ??

2011-01-24 Thread Eric Gilmore
Thanks very much Patrick for the good words and suggestions.  Those are
important points about initial_token and nodetool move.

Definitely, keep us informed about any and all doc issues you have, and we
will do what we can to keep improving the docs.

Eric

On Sun, Jan 23, 2011 at 2:26 PM, Patrick de Torcy wrote:

> Thanks, Eric and Peter, for all the replies ! It helped me a lot...
>
> I've read again the Getting Started 
> page...
> In fact I have particularly read the chapter : "setting up a multi node
> cluster" (as it was what I tried to do). It's written : "The rest of this
> section uses a two-node example cluster. With two nodes, a new Cassandra
> cluster’s load is automatically balanced, and remains balanced if you
> increase to four nodes, then eight". So I thought that keeping the default
> parameter (ie blank) would have been enough. So I think you should add in
> your doc (and in the yaml comments) that if it's the first node of your
> cluster, you really should set intialToken to 0, if you want your further
> nodes balanced.
>
> You should add too, that if your cluster  is unbalanced, you 'll have to
> run : nodetool host move newToken (it's not specified in this section). Some
> examples would be useful too. For people new to Cassandra, this part is very
> confusing (well, maybe I'm a little dumb too...)
>
> But even with these "flaws", your documentation is the best I have read.
> And if I have other issues, don't worry, you'll be informed :-).
>
> Thanks again,
>
> Patrick
>
>
> On Thu, Jan 20, 2011 at 8:55 PM, Eric Gilmore  wrote:
>
>> Patrick, if you try adding capacity again from the beginning, I'd be
>> curious to hear if the 
>> DataStax/Riptanodocs
>>  are helpful or not.
>>
>> Also, in the Getting Started 
>> page,
>> we note that it may be best to set initial_token to 0 on the very first node
>> that you start.
>>
>> Regards,
>>
>> Eric Gilmore
>>
>>
>> On Thu, Jan 20, 2011 at 11:05 AM, Peter Schuller <
>> peter.schul...@infidyne.com> wrote:
>>
>>> > Is it supposed to work that way, or have I missed something ?
>>>
>>> I don't see that you did anything wrong based on your description and
>>> based on my understanding how it works in 0.7 (not sure about 0.6),
>>> but hopefully someone else can address that part. What I can think of
>>> - did you inspect the log on the new node? Does it say anything about
>>> bootstraping or streaming data from other nodes? Does 'nodetool ring'
>>> indicate it considers itself completely up and in the cluster already?
>>>
>>> Trying to determine whether the node is in fact considering it self
>>> done bootstrapping and joined to the ring, yet containing no data.
>>>
>>> > I tried then to put values for initialToken for both nodes (stopping
>>> and
>>> > restartings the servers), but it didn't change anything : I have the
>>> same
>>> > token values...
>>>
>>> This is expected. Once the node has bootstrapped into the cluster and
>>> saved its token, it will no longer try to acquire a new one. Any
>>> initial token in the configuration is ignored; it is only the
>>> *initial* token, quite literally. Changing the token would require a
>>> 'nodetool move' command.
>>>
>>> --
>>> / Peter Schuller
>>>
>>
>>
>>
>> --
>> *Eric Gilmore
>> *
>> Consulting Technical Writer
>> Riptano, Inc.
>> Ph: 510 684 9786  (cell)
>>
>>
>


-- 
*Eric Gilmore
*
Consulting Technical Writer
Riptano, Inc.
Ph: 510 684 9786  (cell)


Re: How does Bootstrapping work in 0.7 ??

2011-01-23 Thread Patrick de Torcy
Thanks, Eric and Peter, for all the replies ! It helped me a lot...

I've read again the Getting Started
page...
In fact I have particularly read the chapter : "setting up a multi node
cluster" (as it was what I tried to do). It's written : "The rest of this
section uses a two-node example cluster. With two nodes, a new Cassandra
cluster’s load is automatically balanced, and remains balanced if you
increase to four nodes, then eight". So I thought that keeping the default
parameter (ie blank) would have been enough. So I think you should add in
your doc (and in the yaml comments) that if it's the first node of your
cluster, you really should set intialToken to 0, if you want your further
nodes balanced.

You should add too, that if your cluster  is unbalanced, you 'll have to run
: nodetool host move newToken (it's not specified in this section). Some
examples would be useful too. For people new to Cassandra, this part is very
confusing (well, maybe I'm a little dumb too...)

But even with these "flaws", your documentation is the best I have read. And
if I have other issues, don't worry, you'll be informed :-).

Thanks again,

Patrick

On Thu, Jan 20, 2011 at 8:55 PM, Eric Gilmore  wrote:

> Patrick, if you try adding capacity again from the beginning, I'd be
> curious to hear if the 
> DataStax/Riptanodocs
>  are helpful or not.
>
> Also, in the Getting Started 
> page,
> we note that it may be best to set initial_token to 0 on the very first node
> that you start.
>
> Regards,
>
> Eric Gilmore
>
>
> On Thu, Jan 20, 2011 at 11:05 AM, Peter Schuller <
> peter.schul...@infidyne.com> wrote:
>
>> > Is it supposed to work that way, or have I missed something ?
>>
>> I don't see that you did anything wrong based on your description and
>> based on my understanding how it works in 0.7 (not sure about 0.6),
>> but hopefully someone else can address that part. What I can think of
>> - did you inspect the log on the new node? Does it say anything about
>> bootstraping or streaming data from other nodes? Does 'nodetool ring'
>> indicate it considers itself completely up and in the cluster already?
>>
>> Trying to determine whether the node is in fact considering it self
>> done bootstrapping and joined to the ring, yet containing no data.
>>
>> > I tried then to put values for initialToken for both nodes (stopping and
>> > restartings the servers), but it didn't change anything : I have the
>> same
>> > token values...
>>
>> This is expected. Once the node has bootstrapped into the cluster and
>> saved its token, it will no longer try to acquire a new one. Any
>> initial token in the configuration is ignored; it is only the
>> *initial* token, quite literally. Changing the token would require a
>> 'nodetool move' command.
>>
>> --
>> / Peter Schuller
>>
>
>
>
> --
> *Eric Gilmore
> *
> Consulting Technical Writer
> Riptano, Inc.
> Ph: 510 684 9786  (cell)
>
>


Re: How does Bootstrapping work in 0.7 ??

2011-01-20 Thread Jonathan Ellis
It's okay as of 0.6.10 and 0.7.0.

But the bug only affected range queries, and you'd know if you'd hit
it because there would be really obvious exception messages in your
log.

In other words it's probably not necessary to move your nodes.

On Thu, Jan 20, 2011 at 4:30 PM, Jeremiah Jordan
 wrote:
> Is 0 really OK?  I remember some bugs coming up recently with a token of 0.
> I was thinking about moving my 0 token servers to 1 because of that.
>
>
>
> -Jeremiah Jordan
>
>
>
> 
>
> From: Eric Gilmore [mailto:e...@riptano.com]
> Sent: Thursday, January 20, 2011 1:55 PM
> To: user@cassandra.apache.org
> Subject: Re: How does Bootstrapping work in 0.7 ??
>
>
>
> Patrick, if you try adding capacity again from the beginning, I'd be curious
> to hear if the DataStax/Riptano docs are helpful or not.
>
> Also, in the Getting Started page, we note that it may be best to set
> initial_token to 0 on the very first node that you start.
>
> Regards,
>
> Eric Gilmore
>
> On Thu, Jan 20, 2011 at 11:05 AM, Peter Schuller
>  wrote:
>
>> Is it supposed to work that way, or have I missed something ?
>
> I don't see that you did anything wrong based on your description and
> based on my understanding how it works in 0.7 (not sure about 0.6),
> but hopefully someone else can address that part. What I can think of
> - did you inspect the log on the new node? Does it say anything about
> bootstraping or streaming data from other nodes? Does 'nodetool ring'
> indicate it considers itself completely up and in the cluster already?
>
> Trying to determine whether the node is in fact considering it self
> done bootstrapping and joined to the ring, yet containing no data.
>
>> I tried then to put values for initialToken for both nodes (stopping and
>> restartings the servers), but it didn't change anything : I have the same
>> token values...
>
> This is expected. Once the node has bootstrapped into the cluster and
> saved its token, it will no longer try to acquire a new one. Any
> initial token in the configuration is ignored; it is only the
> *initial* token, quite literally. Changing the token would require a
> 'nodetool move' command.
>
> --
> / Peter Schuller
>
>
> --
>
> Eric Gilmore
>
> Consulting Technical Writer
>
> Riptano, Inc.
>
> Ph: 510 684 9786  (cell)
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com


RE: How does Bootstrapping work in 0.7 ??

2011-01-20 Thread Jeremiah Jordan
Is 0 really OK?  I remember some bugs coming up recently with a token of
0.  I was thinking about moving my 0 token servers to 1 because of that.

 

-Jeremiah Jordan

 



From: Eric Gilmore [mailto:e...@riptano.com] 
Sent: Thursday, January 20, 2011 1:55 PM
To: user@cassandra.apache.org
Subject: Re: How does Bootstrapping work in 0.7 ??

 

Patrick, if you try adding capacity again from the beginning, I'd be
curious to hear if the DataStax/Riptano
<http://www.datastax.com/docs/0.7/operations/clustering#adding-capacity>
docs are helpful or not.

Also, in the Getting Started page
<http://www.datastax.com/docs/0.7/getting_started/index> , we note that
it may be best to set initial_token to 0 on the very first node that you
start.  

Regards,

Eric Gilmore

On Thu, Jan 20, 2011 at 11:05 AM, Peter Schuller
 wrote:

> Is it supposed to work that way, or have I missed something ?

I don't see that you did anything wrong based on your description and
based on my understanding how it works in 0.7 (not sure about 0.6),
but hopefully someone else can address that part. What I can think of
- did you inspect the log on the new node? Does it say anything about
bootstraping or streaming data from other nodes? Does 'nodetool ring'
indicate it considers itself completely up and in the cluster already?

Trying to determine whether the node is in fact considering it self
done bootstrapping and joined to the ring, yet containing no data.


> I tried then to put values for initialToken for both nodes (stopping
and
> restartings the servers), but it didn't change anything : I have the
same
> token values...

This is expected. Once the node has bootstrapped into the cluster and
saved its token, it will no longer try to acquire a new one. Any
initial token in the configuration is ignored; it is only the
*initial* token, quite literally. Changing the token would require a
'nodetool move' command.

--
/ Peter Schuller




-- 

Eric Gilmore

Consulting Technical Writer

Riptano, Inc.

Ph: 510 684 9786  (cell)

 



Re: How does Bootstrapping work in 0.7 ??

2011-01-20 Thread Eric Gilmore
 Sorry, my comments were indeed a little short on elucidation.  :)

The cited doc suggest that setting initial_token to 0 on the first node
"simplifies load balancing as you later expand the cluster . . . .  If this
is unset (the default), Cassandra picks a token number randomly."

A more complete explanation might look something like:

. . . it is recommended to set the initial token's value to zero.  This
simplifies load balancing as you later expand the cluster, since the node
starting at 0 will never need to be moved to a new token.  Also, if this is
unset (the default), Cassandra picks a token number randomly, which can lead
to hot spots in the ring.


On Thu, Jan 20, 2011 at 12:59 PM, Brandon Williams  wrote:

> On Thu, Jan 20, 2011 at 2:14 PM, Robert Coli  wrote:
>
>> On Thu, Jan 20, 2011 at 11:55 AM, Eric Gilmore  wrote:
>> > Also, in the Getting Started page, we note that it may be best to set
>> > initial_token to 0 on the very first node that you start.
>>
>> Could you expand a bit on the reasons for and implications of this,
>> for our collective elucidation? :)
>>
>
> Because then the node never has to move.  Same would be true of 2**127, but
> zero is mnemonically easier. :)
>
> -Brandon
>



-- 
*Eric Gilmore
*
Consulting Technical Writer
Riptano, Inc.
Ph: 510 684 9786  (cell)


Re: How does Bootstrapping work in 0.7 ??

2011-01-20 Thread Brandon Williams
On Thu, Jan 20, 2011 at 2:14 PM, Robert Coli  wrote:

> On Thu, Jan 20, 2011 at 11:55 AM, Eric Gilmore  wrote:
> > Also, in the Getting Started page, we note that it may be best to set
> > initial_token to 0 on the very first node that you start.
>
> Could you expand a bit on the reasons for and implications of this,
> for our collective elucidation? :)
>

Because then the node never has to move.  Same would be true of 2**127, but
zero is mnemonically easier. :)

-Brandon


Re: How does Bootstrapping work in 0.7 ??

2011-01-20 Thread Robert Coli
On Thu, Jan 20, 2011 at 11:55 AM, Eric Gilmore  wrote:
> Also, in the Getting Started page, we note that it may be best to set
> initial_token to 0 on the very first node that you start.

Could you expand a bit on the reasons for and implications of this,
for our collective elucidation? :)

=Rob


Re: How does Bootstrapping work in 0.7 ??

2011-01-20 Thread Eric Gilmore
Patrick, if you try adding capacity again from the beginning, I'd be curious
to hear if the 
DataStax/Riptanodocs
are helpful or not.

Also, in the Getting Started
page,
we note that it may be best to set initial_token to 0 on the very first node
that you start.

Regards,

Eric Gilmore

On Thu, Jan 20, 2011 at 11:05 AM, Peter Schuller <
peter.schul...@infidyne.com> wrote:

> > Is it supposed to work that way, or have I missed something ?
>
> I don't see that you did anything wrong based on your description and
> based on my understanding how it works in 0.7 (not sure about 0.6),
> but hopefully someone else can address that part. What I can think of
> - did you inspect the log on the new node? Does it say anything about
> bootstraping or streaming data from other nodes? Does 'nodetool ring'
> indicate it considers itself completely up and in the cluster already?
>
> Trying to determine whether the node is in fact considering it self
> done bootstrapping and joined to the ring, yet containing no data.
>
> > I tried then to put values for initialToken for both nodes (stopping and
> > restartings the servers), but it didn't change anything : I have the same
> > token values...
>
> This is expected. Once the node has bootstrapped into the cluster and
> saved its token, it will no longer try to acquire a new one. Any
> initial token in the configuration is ignored; it is only the
> *initial* token, quite literally. Changing the token would require a
> 'nodetool move' command.
>
> --
> / Peter Schuller
>



-- 
*Eric Gilmore
*
Consulting Technical Writer
Riptano, Inc.
Ph: 510 684 9786  (cell)


Re: How does Bootstrapping work in 0.7 ??

2011-01-20 Thread Peter Schuller
> Is it supposed to work that way, or have I missed something ?

I don't see that you did anything wrong based on your description and
based on my understanding how it works in 0.7 (not sure about 0.6),
but hopefully someone else can address that part. What I can think of
- did you inspect the log on the new node? Does it say anything about
bootstraping or streaming data from other nodes? Does 'nodetool ring'
indicate it considers itself completely up and in the cluster already?

Trying to determine whether the node is in fact considering it self
done bootstrapping and joined to the ring, yet containing no data.

> I tried then to put values for initialToken for both nodes (stopping and
> restartings the servers), but it didn't change anything : I have the same
> token values...

This is expected. Once the node has bootstrapped into the cluster and
saved its token, it will no longer try to acquire a new one. Any
initial token in the configuration is ignored; it is only the
*initial* token, quite literally. Changing the token would require a
'nodetool move' command.

-- 
/ Peter Schuller


How does Bootstrapping work in 0.7 ??

2011-01-20 Thread Patrick de Torcy
Hi,

I've read many, many docs (yes ,
http://wiki.apache.org/cassandra/Operationstoo...) but I still can't
see how bootstrapping work...

I started with one node and put my data in it (16 GB). It's ok.

I added a second node with AutoBootstrap=true (as explained in the doc, I
didn't add this node in the seeds list). In the two nodes, I didn't
specified the initial token.

>From the doc : "If you explicitly specify an InitialToken in the
configuration, the new node will bootstrap to that position on the ring.
Otherwise, it will pick a Token that will give it half the keys from the
node with the most disk space used, that does not already have another node
bootstrapping into its Range."

So the new node should be in charge of about half the keys. When I start the
second none, nothing happens : no data migratation to the new node (it's
data folder is empty...)

Is it supposed to work that way, or have I missed something ?

when I look to the ring, I can see my two nodes (the first one with 90%, the
second one with 10%).

I tried then to put values for initialToken for both nodes (stopping and
restartings the servers), but it didn't change anything : I have the same
token values...

Please help, I'm becoming mad...

thanks,

Patrick