You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Daning Wang <da...@netseer.com> on 2013/02/02 22:45:56 UTC

Upgrade to Cassandra 1.2

I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is that it
can have multiple tokens in one node. but there is only one token in 1.1.6.

how can I upgrade to 1.2.1 then breaking the token to take advantage of
this feature? I went through this doc but it does not say how to change the
num_token

http://www.datastax.com/docs/1.2/install/upgrading

 Is there other doc about this upgrade path?

Thanks,

Daning

Re: Upgrade to Cassandra 1.2

Posted by Alain RODRIGUEZ <ar...@gmail.com>.
There was a webinar (Datastax C*llege) about Vnodes. It will be available
soon there I guess: http://www.datastax.com/resources/webinars/collegecredit.
You could have watch it live and ask your own questions.

Here is a howto:
http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes

Alain


2013/2/15 Daning Wang <da...@netseer.com>

> Thanks! suppose I  can upgrade to 1.2.x with 1 token by commenting out
> num_tokens, how can I changed to multiple tokens? could not find doc
> clearly stating about this.
>
>
> On Thu, Feb 14, 2013 at 10:54 AM, Alain RODRIGUEZ <ar...@gmail.com>wrote:
>
>> From:
>> http://www.datastax.com/docs/1.2/configuration/node_configuration#num-tokens
>>
>> About num_tokens: "If left unspecified, Cassandra uses the default value
>> of 1 token (for legacy compatibility) and uses the initial_token. If you
>> already have a cluster with one token per node, and wish to migrate to
>> multiple tokens per node".
>>
>> So I would let "#num_tokens" commented in the cassandra.yaml and would
>> set the initial_token at the same value than in the pre-C*1.2.x-uprage
>> configuration.
>>
>> Alain
>>
>>
>> 2013/2/14 Daning Wang <da...@netseer.com>
>>
>>> Thanks Aaron and Manu.
>>>
>>> Since we are using 1.1, there is no num_taken parameter. when I upgrade
>>> to 1.2, should I set num_token=1 to start up,  or I can set to other
>>> numbers?
>>>
>>> Daning
>>>
>>>
>>>
>>>
>>> On Tue, Feb 12, 2013 at 3:45 PM, Manu Zhang <ow...@gmail.com>wrote:
>>>
>>>> num_tokens is only used at bootstrap
>>>>
>>>> I think it's also used in this case (already bootstrapped with
>>>> num_tokens = 1 and now num_tokens > 1). Cassandra will split a node's
>>>> current range into *num_tokens* parts and there should be no change to the
>>>> amount of ring a node holds before shuffling.
>>>>
>>>>
>>>> On Wed, Feb 13, 2013 at 3:12 AM, aaron morton <aa...@thelastpickle.com>wrote:
>>>>
>>>>> Restore the settings for num_tokens and intial_token to what they were
>>>>> before you upgraded.
>>>>> They should not be changed just because you are upgrading to 1.2, they
>>>>> are used to enable virtual nodes. Which are not necessary to run 1.2.
>>>>>
>>>>> Cheers
>>>>>
>>>>>
>>>>>    -----------------
>>>>> Aaron Morton
>>>>> Freelance Cassandra Developer
>>>>> New Zealand
>>>>>
>>>>> @aaronmorton
>>>>> http://www.thelastpickle.com
>>>>>
>>>>> On 13/02/2013, at 8:02 AM, Daning Wang <da...@netseer.com> wrote:
>>>>>
>>>>> No, I did not run shuffle since the upgrade was not successful.
>>>>>
>>>>> what do you mean "reverting the changes to num_tokens and
>>>>> inital_token"? set num_tokens=1? initial_token should be ignored since it
>>>>> is not bootstrap. right?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Daning
>>>>>
>>>>> On Tue, Feb 12, 2013 at 10:52 AM, aaron morton <
>>>>> aaron@thelastpickle.com> wrote:
>>>>>
>>>>>> Were you upgrading to 1.2 AND running the shuffle or just upgrading
>>>>>> to 1.2?
>>>>>>
>>>>>> If you have not run shuffle I would suggest reverting the changes to
>>>>>> num_tokens and inital_token. This is a guess because num_tokens is only
>>>>>> used at bootstrap.
>>>>>>
>>>>>> Just get upgraded to 1.2 first, then do the shuffle when things are
>>>>>> stable.
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>>    -----------------
>>>>>> Aaron Morton
>>>>>> Freelance Cassandra Developer
>>>>>> New Zealand
>>>>>>
>>>>>> @aaronmorton
>>>>>> http://www.thelastpickle.com
>>>>>>
>>>>>> On 12/02/2013, at 2:55 PM, Daning Wang <da...@netseer.com> wrote:
>>>>>>
>>>>>> Thanks Aaron.
>>>>>>
>>>>>> I tried to migrate existing cluster(ver 1.1.0) to 1.2.1 but failed.
>>>>>>
>>>>>> - I followed http://www.datastax.com/docs/1.2/install/upgrading, have
>>>>>> merged cassandra.yaml, with follow parameter
>>>>>>
>>>>>> num_tokens: 256
>>>>>> #initial_token: 0
>>>>>>
>>>>>> the initial_token is commented out, current token should be obtained
>>>>>> from system schema
>>>>>>
>>>>>> - I did rolling upgrade, during the upgrade, I got "Borken Pipe"
>>>>>> error from the nodes with old version, is that normal?
>>>>>>
>>>>>> - After I upgraded 3 nodes(still have 5 to go), I found it is total
>>>>>> wrong, the first node upgraded owns 99.2 of ring
>>>>>>
>>>>>> [cassy@d5:/usr/local/cassy conf]$  ~/bin/nodetool -h localhost status
>>>>>> Datacenter: datacenter1
>>>>>> =======================
>>>>>> Status=Up/Down
>>>>>> |/ State=Normal/Leaving/Joining/Moving
>>>>>> --  Address           Load       Tokens  Owns   Host ID
>>>>>>                 Rack
>>>>>> DN  10.210.101.117    45.01 GB   254     99.2%
>>>>>>  f4b6afe3-7e2e-4c61-96e8-12a529a31373  rack1
>>>>>> UN  10.210.101.120    45.43 GB   256     0.4%
>>>>>> 0fd912fb-3187-462b-8c8a-7d223751b649  rack1
>>>>>> UN  10.210.101.111    27.08 GB   256     0.4%
>>>>>> bd4c37bc-07dd-488b-bfab-e74e32c26f6e  rack1
>>>>>>
>>>>>>
>>>>>> What was wrong? please help. I could provide more information if you
>>>>>> need.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Daning
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Feb 4, 2013 at 9:16 AM, aaron morton <aaron@thelastpickle.com
>>>>>> > wrote:
>>>>>>
>>>>>>> There is a command line utility in 1.2 to shuffle the tokens…
>>>>>>>
>>>>>>>
>>>>>>> http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes
>>>>>>>
>>>>>>> $ ./cassandra-shuffle --help
>>>>>>> Missing sub-command argument.
>>>>>>> Usage: shuffle [options] <sub-command>
>>>>>>>
>>>>>>> Sub-commands:
>>>>>>>  create           Initialize a new shuffle operation
>>>>>>>  ls               List pending relocations
>>>>>>>  clear            Clear pending relocations
>>>>>>>  en[able]         Enable shuffling
>>>>>>>  dis[able]        Disable shuffling
>>>>>>>
>>>>>>> Options:
>>>>>>>  -dc,  --only-dc           Apply only to named DC (create only)
>>>>>>>  -tp,  --thrift-port       Thrift port number (Default: 9160)
>>>>>>>  -p,   --port              JMX port number (Default: 7199)
>>>>>>>  -tf,  --thrift-framed     Enable framed transport for Thrift
>>>>>>> (Default: false)
>>>>>>>  -en,  --and-enable        Immediately enable shuffling (create only)
>>>>>>>  -H,   --help              Print help information
>>>>>>>  -h,   --host              JMX hostname or IP address (Default:
>>>>>>> localhost)
>>>>>>>  -th,  --thrift-host       Thrift hostname or IP address (Default:
>>>>>>> JMX host)
>>>>>>>
>>>>>>> Cheers
>>>>>>>
>>>>>>>    -----------------
>>>>>>> Aaron Morton
>>>>>>> Freelance Cassandra Developer
>>>>>>> New Zealand
>>>>>>>
>>>>>>> @aaronmorton
>>>>>>> http://www.thelastpickle.com
>>>>>>>
>>>>>>> On 3/02/2013, at 11:32 PM, Manu Zhang <ow...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> On Sun 03 Feb 2013 05:45:56 AM CST, Daning Wang wrote:
>>>>>>>
>>>>>>> I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is
>>>>>>> that it can have multiple tokens in one node. but there is only one
>>>>>>> token in 1.1.6.
>>>>>>>
>>>>>>> how can I upgrade to 1.2.1 then breaking the token to take advantage
>>>>>>> of this feature? I went through this doc but it does not say how to
>>>>>>> change the num_token
>>>>>>>
>>>>>>> http://www.datastax.com/docs/1.2/install/upgrading
>>>>>>>
>>>>>>> Is there other doc about this upgrade path?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Daning
>>>>>>>
>>>>>>>
>>>>>>> I think for each node you need to change the num_token option in
>>>>>>> conf/cassandra.yaml (this only split the current range into num_token
>>>>>>> parts) and run the bin/cassandra-shuffle command (this spread it all over
>>>>>>> the ring).
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Upgrade to Cassandra 1.2

Posted by Eric Evans <ee...@acunu.com>.
On Thu, Feb 14, 2013 at 5:48 PM, Daning Wang <da...@netseer.com> wrote:
> Thanks! suppose I  can upgrade to 1.2.x with 1 token by commenting out
> num_tokens, how can I changed to multiple tokens? could not find doc clearly
> stating about this.

If you decided to move to virtual nodes after upgrading to 1.2, you
can simply uncomment num_tokens and set it to something > 1 (the
recommended value is 256), then restart.  The is a one-time deal
though, it's similar to initial_token in that it will split the
existing range 256 ways and assign the tokens accordingly; Subsequent
changes to num_tokens will be silently ignored.  Make sure this is
what you want ahead of time as there is currently no way to change it
after the fact.

> On Thu, Feb 14, 2013 at 10:54 AM, Alain RODRIGUEZ <ar...@gmail.com>
> wrote:
>>
>> From:
>> http://www.datastax.com/docs/1.2/configuration/node_configuration#num-tokens
>>
>> About num_tokens: "If left unspecified, Cassandra uses the default value
>> of 1 token (for legacy compatibility) and uses the initial_token. If you
>> already have a cluster with one token per node, and wish to migrate to
>> multiple tokens per node".
>>
>> So I would let "#num_tokens" commented in the cassandra.yaml and would set
>> the initial_token at the same value than in the pre-C*1.2.x-uprage
>> configuration.
>>
>> Alain
>>
>>
>> 2013/2/14 Daning Wang <da...@netseer.com>
>>>
>>> Thanks Aaron and Manu.
>>>
>>> Since we are using 1.1, there is no num_taken parameter. when I upgrade
>>> to 1.2, should I set num_token=1 to start up,  or I can set to other
>>> numbers?
>>>
>>> Daning
>>>
>>>
>>>
>>>
>>> On Tue, Feb 12, 2013 at 3:45 PM, Manu Zhang <ow...@gmail.com>
>>> wrote:
>>>>>
>>>>> num_tokens is only used at bootstrap
>>>>
>>>> I think it's also used in this case (already bootstrapped with
>>>> num_tokens = 1 and now num_tokens > 1). Cassandra will split a node's
>>>> current range into *num_tokens* parts and there should be no change to the
>>>> amount of ring a node holds before shuffling.
>>>>
>>>>
>>>> On Wed, Feb 13, 2013 at 3:12 AM, aaron morton <aa...@thelastpickle.com>
>>>> wrote:
>>>>>
>>>>> Restore the settings for num_tokens and intial_token to what they were
>>>>> before you upgraded.
>>>>> They should not be changed just because you are upgrading to 1.2, they
>>>>> are used to enable virtual nodes. Which are not necessary to run 1.2.
>>>>>
>>>>> Cheers
>>>>>
>>>>>
>>>>> -----------------
>>>>> Aaron Morton
>>>>> Freelance Cassandra Developer
>>>>> New Zealand
>>>>>
>>>>> @aaronmorton
>>>>> http://www.thelastpickle.com
>>>>>
>>>>> On 13/02/2013, at 8:02 AM, Daning Wang <da...@netseer.com> wrote:
>>>>>
>>>>> No, I did not run shuffle since the upgrade was not successful.
>>>>>
>>>>> what do you mean "reverting the changes to num_tokens and
>>>>> inital_token"? set num_tokens=1? initial_token should be ignored since it is
>>>>> not bootstrap. right?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Daning
>>>>>
>>>>> On Tue, Feb 12, 2013 at 10:52 AM, aaron morton
>>>>> <aa...@thelastpickle.com> wrote:
>>>>>>
>>>>>> Were you upgrading to 1.2 AND running the shuffle or just upgrading to
>>>>>> 1.2?
>>>>>>
>>>>>> If you have not run shuffle I would suggest reverting the changes to
>>>>>> num_tokens and inital_token. This is a guess because num_tokens is only used
>>>>>> at bootstrap.
>>>>>>
>>>>>> Just get upgraded to 1.2 first, then do the shuffle when things are
>>>>>> stable.
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> -----------------
>>>>>> Aaron Morton
>>>>>> Freelance Cassandra Developer
>>>>>> New Zealand
>>>>>>
>>>>>> @aaronmorton
>>>>>> http://www.thelastpickle.com
>>>>>>
>>>>>> On 12/02/2013, at 2:55 PM, Daning Wang <da...@netseer.com> wrote:
>>>>>>
>>>>>> Thanks Aaron.
>>>>>>
>>>>>> I tried to migrate existing cluster(ver 1.1.0) to 1.2.1 but failed.
>>>>>>
>>>>>> - I followed http://www.datastax.com/docs/1.2/install/upgrading, have
>>>>>> merged cassandra.yaml, with follow parameter
>>>>>>
>>>>>> num_tokens: 256
>>>>>> #initial_token: 0
>>>>>>
>>>>>> the initial_token is commented out, current token should be obtained
>>>>>> from system schema
>>>>>>
>>>>>> - I did rolling upgrade, during the upgrade, I got "Borken Pipe" error
>>>>>> from the nodes with old version, is that normal?
>>>>>>
>>>>>> - After I upgraded 3 nodes(still have 5 to go), I found it is total
>>>>>> wrong, the first node upgraded owns 99.2 of ring
>>>>>>
>>>>>> [cassy@d5:/usr/local/cassy conf]$  ~/bin/nodetool -h localhost status
>>>>>> Datacenter: datacenter1
>>>>>> =======================
>>>>>> Status=Up/Down
>>>>>> |/ State=Normal/Leaving/Joining/Moving
>>>>>> --  Address           Load       Tokens  Owns   Host ID
>>>>>> Rack
>>>>>> DN  10.210.101.117    45.01 GB   254     99.2%
>>>>>> f4b6afe3-7e2e-4c61-96e8-12a529a31373  rack1
>>>>>> UN  10.210.101.120    45.43 GB   256     0.4%
>>>>>> 0fd912fb-3187-462b-8c8a-7d223751b649  rack1
>>>>>> UN  10.210.101.111    27.08 GB   256     0.4%
>>>>>> bd4c37bc-07dd-488b-bfab-e74e32c26f6e  rack1
>>>>>>
>>>>>>
>>>>>> What was wrong? please help. I could provide more information if you
>>>>>> need.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Daning
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Feb 4, 2013 at 9:16 AM, aaron morton <aa...@thelastpickle.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> There is a command line utility in 1.2 to shuffle the tokens…
>>>>>>>
>>>>>>>
>>>>>>> http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes
>>>>>>>
>>>>>>> $ ./cassandra-shuffle --help
>>>>>>> Missing sub-command argument.
>>>>>>> Usage: shuffle [options] <sub-command>
>>>>>>>
>>>>>>> Sub-commands:
>>>>>>>  create           Initialize a new shuffle operation
>>>>>>>  ls               List pending relocations
>>>>>>>  clear            Clear pending relocations
>>>>>>>  en[able]         Enable shuffling
>>>>>>>  dis[able]        Disable shuffling
>>>>>>>
>>>>>>> Options:
>>>>>>>  -dc,  --only-dc           Apply only to named DC (create only)
>>>>>>>  -tp,  --thrift-port       Thrift port number (Default: 9160)
>>>>>>>  -p,   --port              JMX port number (Default: 7199)
>>>>>>>  -tf,  --thrift-framed     Enable framed transport for Thrift
>>>>>>> (Default: false)
>>>>>>>  -en,  --and-enable        Immediately enable shuffling (create only)
>>>>>>>  -H,   --help              Print help information
>>>>>>>  -h,   --host              JMX hostname or IP address (Default:
>>>>>>> localhost)
>>>>>>>  -th,  --thrift-host       Thrift hostname or IP address (Default:
>>>>>>> JMX host)
>>>>>>>
>>>>>>> Cheers
>>>>>>>
>>>>>>> -----------------
>>>>>>> Aaron Morton
>>>>>>> Freelance Cassandra Developer
>>>>>>> New Zealand
>>>>>>>
>>>>>>> @aaronmorton
>>>>>>> http://www.thelastpickle.com
>>>>>>>
>>>>>>> On 3/02/2013, at 11:32 PM, Manu Zhang <ow...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> On Sun 03 Feb 2013 05:45:56 AM CST, Daning Wang wrote:
>>>>>>>
>>>>>>> I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is
>>>>>>> that it can have multiple tokens in one node. but there is only one
>>>>>>> token in 1.1.6.
>>>>>>>
>>>>>>> how can I upgrade to 1.2.1 then breaking the token to take advantage
>>>>>>> of this feature? I went through this doc but it does not say how to
>>>>>>> change the num_token
>>>>>>>
>>>>>>> http://www.datastax.com/docs/1.2/install/upgrading
>>>>>>>
>>>>>>> Is there other doc about this upgrade path?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Daning
>>>>>>>
>>>>>>>
>>>>>>> I think for each node you need to change the num_token option in
>>>>>>> conf/cassandra.yaml (this only split the current range into num_token parts)
>>>>>>> and run the bin/cassandra-shuffle command (this spread it all over the
>>>>>>> ring).
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>



-- 
Eric Evans
Acunu | http://www.acunu.com | @acunu

Re: Upgrade to Cassandra 1.2

Posted by Daning Wang <da...@netseer.com>.
Thanks! suppose I  can upgrade to 1.2.x with 1 token by commenting out
num_tokens, how can I changed to multiple tokens? could not find doc
clearly stating about this.


On Thu, Feb 14, 2013 at 10:54 AM, Alain RODRIGUEZ <ar...@gmail.com>wrote:

> From:
> http://www.datastax.com/docs/1.2/configuration/node_configuration#num-tokens
>
> About num_tokens: "If left unspecified, Cassandra uses the default value
> of 1 token (for legacy compatibility) and uses the initial_token. If you
> already have a cluster with one token per node, and wish to migrate to
> multiple tokens per node".
>
> So I would let "#num_tokens" commented in the cassandra.yaml and would
> set the initial_token at the same value than in the pre-C*1.2.x-uprage
> configuration.
>
> Alain
>
>
> 2013/2/14 Daning Wang <da...@netseer.com>
>
>> Thanks Aaron and Manu.
>>
>> Since we are using 1.1, there is no num_taken parameter. when I upgrade
>> to 1.2, should I set num_token=1 to start up,  or I can set to other
>> numbers?
>>
>> Daning
>>
>>
>>
>>
>> On Tue, Feb 12, 2013 at 3:45 PM, Manu Zhang <ow...@gmail.com>wrote:
>>
>>> num_tokens is only used at bootstrap
>>>
>>> I think it's also used in this case (already bootstrapped with
>>> num_tokens = 1 and now num_tokens > 1). Cassandra will split a node's
>>> current range into *num_tokens* parts and there should be no change to the
>>> amount of ring a node holds before shuffling.
>>>
>>>
>>> On Wed, Feb 13, 2013 at 3:12 AM, aaron morton <aa...@thelastpickle.com>wrote:
>>>
>>>> Restore the settings for num_tokens and intial_token to what they were
>>>> before you upgraded.
>>>> They should not be changed just because you are upgrading to 1.2, they
>>>> are used to enable virtual nodes. Which are not necessary to run 1.2.
>>>>
>>>> Cheers
>>>>
>>>>
>>>>    -----------------
>>>> Aaron Morton
>>>> Freelance Cassandra Developer
>>>> New Zealand
>>>>
>>>> @aaronmorton
>>>> http://www.thelastpickle.com
>>>>
>>>> On 13/02/2013, at 8:02 AM, Daning Wang <da...@netseer.com> wrote:
>>>>
>>>> No, I did not run shuffle since the upgrade was not successful.
>>>>
>>>> what do you mean "reverting the changes to num_tokens and
>>>> inital_token"? set num_tokens=1? initial_token should be ignored since it
>>>> is not bootstrap. right?
>>>>
>>>> Thanks,
>>>>
>>>> Daning
>>>>
>>>> On Tue, Feb 12, 2013 at 10:52 AM, aaron morton <aaron@thelastpickle.com
>>>> > wrote:
>>>>
>>>>> Were you upgrading to 1.2 AND running the shuffle or just upgrading to
>>>>> 1.2?
>>>>>
>>>>> If you have not run shuffle I would suggest reverting the changes to
>>>>> num_tokens and inital_token. This is a guess because num_tokens is only
>>>>> used at bootstrap.
>>>>>
>>>>> Just get upgraded to 1.2 first, then do the shuffle when things are
>>>>> stable.
>>>>>
>>>>> Cheers
>>>>>
>>>>>    -----------------
>>>>> Aaron Morton
>>>>> Freelance Cassandra Developer
>>>>> New Zealand
>>>>>
>>>>> @aaronmorton
>>>>> http://www.thelastpickle.com
>>>>>
>>>>> On 12/02/2013, at 2:55 PM, Daning Wang <da...@netseer.com> wrote:
>>>>>
>>>>> Thanks Aaron.
>>>>>
>>>>> I tried to migrate existing cluster(ver 1.1.0) to 1.2.1 but failed.
>>>>>
>>>>> - I followed http://www.datastax.com/docs/1.2/install/upgrading, have
>>>>> merged cassandra.yaml, with follow parameter
>>>>>
>>>>> num_tokens: 256
>>>>> #initial_token: 0
>>>>>
>>>>> the initial_token is commented out, current token should be obtained
>>>>> from system schema
>>>>>
>>>>> - I did rolling upgrade, during the upgrade, I got "Borken Pipe" error
>>>>> from the nodes with old version, is that normal?
>>>>>
>>>>> - After I upgraded 3 nodes(still have 5 to go), I found it is total
>>>>> wrong, the first node upgraded owns 99.2 of ring
>>>>>
>>>>> [cassy@d5:/usr/local/cassy conf]$  ~/bin/nodetool -h localhost status
>>>>> Datacenter: datacenter1
>>>>> =======================
>>>>> Status=Up/Down
>>>>> |/ State=Normal/Leaving/Joining/Moving
>>>>> --  Address           Load       Tokens  Owns   Host ID
>>>>>                 Rack
>>>>> DN  10.210.101.117    45.01 GB   254     99.2%
>>>>>  f4b6afe3-7e2e-4c61-96e8-12a529a31373  rack1
>>>>> UN  10.210.101.120    45.43 GB   256     0.4%
>>>>> 0fd912fb-3187-462b-8c8a-7d223751b649  rack1
>>>>> UN  10.210.101.111    27.08 GB   256     0.4%
>>>>> bd4c37bc-07dd-488b-bfab-e74e32c26f6e  rack1
>>>>>
>>>>>
>>>>> What was wrong? please help. I could provide more information if you
>>>>> need.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Daning
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Feb 4, 2013 at 9:16 AM, aaron morton <aa...@thelastpickle.com>wrote:
>>>>>
>>>>>> There is a command line utility in 1.2 to shuffle the tokens…
>>>>>>
>>>>>>
>>>>>> http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes
>>>>>>
>>>>>> $ ./cassandra-shuffle --help
>>>>>> Missing sub-command argument.
>>>>>> Usage: shuffle [options] <sub-command>
>>>>>>
>>>>>> Sub-commands:
>>>>>>  create           Initialize a new shuffle operation
>>>>>>  ls               List pending relocations
>>>>>>  clear            Clear pending relocations
>>>>>>  en[able]         Enable shuffling
>>>>>>  dis[able]        Disable shuffling
>>>>>>
>>>>>> Options:
>>>>>>  -dc,  --only-dc           Apply only to named DC (create only)
>>>>>>  -tp,  --thrift-port       Thrift port number (Default: 9160)
>>>>>>  -p,   --port              JMX port number (Default: 7199)
>>>>>>  -tf,  --thrift-framed     Enable framed transport for Thrift
>>>>>> (Default: false)
>>>>>>  -en,  --and-enable        Immediately enable shuffling (create only)
>>>>>>  -H,   --help              Print help information
>>>>>>  -h,   --host              JMX hostname or IP address (Default:
>>>>>> localhost)
>>>>>>  -th,  --thrift-host       Thrift hostname or IP address (Default:
>>>>>> JMX host)
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>>    -----------------
>>>>>> Aaron Morton
>>>>>> Freelance Cassandra Developer
>>>>>> New Zealand
>>>>>>
>>>>>> @aaronmorton
>>>>>> http://www.thelastpickle.com
>>>>>>
>>>>>> On 3/02/2013, at 11:32 PM, Manu Zhang <ow...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>> On Sun 03 Feb 2013 05:45:56 AM CST, Daning Wang wrote:
>>>>>>
>>>>>> I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is
>>>>>> that it can have multiple tokens in one node. but there is only one
>>>>>> token in 1.1.6.
>>>>>>
>>>>>> how can I upgrade to 1.2.1 then breaking the token to take advantage
>>>>>> of this feature? I went through this doc but it does not say how to
>>>>>> change the num_token
>>>>>>
>>>>>> http://www.datastax.com/docs/1.2/install/upgrading
>>>>>>
>>>>>> Is there other doc about this upgrade path?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Daning
>>>>>>
>>>>>>
>>>>>> I think for each node you need to change the num_token option in
>>>>>> conf/cassandra.yaml (this only split the current range into num_token
>>>>>> parts) and run the bin/cassandra-shuffle command (this spread it all over
>>>>>> the ring).
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Upgrade to Cassandra 1.2

Posted by Alain RODRIGUEZ <ar...@gmail.com>.
From:
http://www.datastax.com/docs/1.2/configuration/node_configuration#num-tokens

About num_tokens: "If left unspecified, Cassandra uses the default value of
1 token (for legacy compatibility) and uses the initial_token. If you
already have a cluster with one token per node, and wish to migrate to
multiple tokens per node".

So I would let "#num_tokens" commented in the cassandra.yaml and would set
the initial_token at the same value than in the pre-C*1.2.x-uprage
configuration.

Alain


2013/2/14 Daning Wang <da...@netseer.com>

> Thanks Aaron and Manu.
>
> Since we are using 1.1, there is no num_taken parameter. when I upgrade to
> 1.2, should I set num_token=1 to start up,  or I can set to other numbers?
>
> Daning
>
>
>
>
> On Tue, Feb 12, 2013 at 3:45 PM, Manu Zhang <ow...@gmail.com>wrote:
>
>> num_tokens is only used at bootstrap
>>
>> I think it's also used in this case (already bootstrapped with num_tokens
>> = 1 and now num_tokens > 1). Cassandra will split a node's current range
>> into *num_tokens* parts and there should be no change to the amount of ring
>> a node holds before shuffling.
>>
>>
>> On Wed, Feb 13, 2013 at 3:12 AM, aaron morton <aa...@thelastpickle.com>wrote:
>>
>>> Restore the settings for num_tokens and intial_token to what they were
>>> before you upgraded.
>>> They should not be changed just because you are upgrading to 1.2, they
>>> are used to enable virtual nodes. Which are not necessary to run 1.2.
>>>
>>> Cheers
>>>
>>>
>>>    -----------------
>>> Aaron Morton
>>> Freelance Cassandra Developer
>>> New Zealand
>>>
>>> @aaronmorton
>>> http://www.thelastpickle.com
>>>
>>> On 13/02/2013, at 8:02 AM, Daning Wang <da...@netseer.com> wrote:
>>>
>>> No, I did not run shuffle since the upgrade was not successful.
>>>
>>> what do you mean "reverting the changes to num_tokens and inital_token"?
>>> set num_tokens=1? initial_token should be ignored since it is not
>>> bootstrap. right?
>>>
>>> Thanks,
>>>
>>> Daning
>>>
>>> On Tue, Feb 12, 2013 at 10:52 AM, aaron morton <aa...@thelastpickle.com>wrote:
>>>
>>>> Were you upgrading to 1.2 AND running the shuffle or just upgrading to
>>>> 1.2?
>>>>
>>>> If you have not run shuffle I would suggest reverting the changes to
>>>> num_tokens and inital_token. This is a guess because num_tokens is only
>>>> used at bootstrap.
>>>>
>>>> Just get upgraded to 1.2 first, then do the shuffle when things are
>>>> stable.
>>>>
>>>> Cheers
>>>>
>>>>    -----------------
>>>> Aaron Morton
>>>> Freelance Cassandra Developer
>>>> New Zealand
>>>>
>>>> @aaronmorton
>>>> http://www.thelastpickle.com
>>>>
>>>> On 12/02/2013, at 2:55 PM, Daning Wang <da...@netseer.com> wrote:
>>>>
>>>> Thanks Aaron.
>>>>
>>>> I tried to migrate existing cluster(ver 1.1.0) to 1.2.1 but failed.
>>>>
>>>> - I followed http://www.datastax.com/docs/1.2/install/upgrading, have
>>>> merged cassandra.yaml, with follow parameter
>>>>
>>>> num_tokens: 256
>>>> #initial_token: 0
>>>>
>>>> the initial_token is commented out, current token should be obtained
>>>> from system schema
>>>>
>>>> - I did rolling upgrade, during the upgrade, I got "Borken Pipe" error
>>>> from the nodes with old version, is that normal?
>>>>
>>>> - After I upgraded 3 nodes(still have 5 to go), I found it is total
>>>> wrong, the first node upgraded owns 99.2 of ring
>>>>
>>>> [cassy@d5:/usr/local/cassy conf]$  ~/bin/nodetool -h localhost status
>>>> Datacenter: datacenter1
>>>> =======================
>>>> Status=Up/Down
>>>> |/ State=Normal/Leaving/Joining/Moving
>>>> --  Address           Load       Tokens  Owns   Host ID
>>>>               Rack
>>>> DN  10.210.101.117    45.01 GB   254     99.2%
>>>>  f4b6afe3-7e2e-4c61-96e8-12a529a31373  rack1
>>>> UN  10.210.101.120    45.43 GB   256     0.4%
>>>> 0fd912fb-3187-462b-8c8a-7d223751b649  rack1
>>>> UN  10.210.101.111    27.08 GB   256     0.4%
>>>> bd4c37bc-07dd-488b-bfab-e74e32c26f6e  rack1
>>>>
>>>>
>>>> What was wrong? please help. I could provide more information if you
>>>> need.
>>>>
>>>> Thanks,
>>>>
>>>> Daning
>>>>
>>>>
>>>>
>>>> On Mon, Feb 4, 2013 at 9:16 AM, aaron morton <aa...@thelastpickle.com>wrote:
>>>>
>>>>> There is a command line utility in 1.2 to shuffle the tokens…
>>>>>
>>>>>
>>>>> http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes
>>>>>
>>>>> $ ./cassandra-shuffle --help
>>>>> Missing sub-command argument.
>>>>> Usage: shuffle [options] <sub-command>
>>>>>
>>>>> Sub-commands:
>>>>>  create           Initialize a new shuffle operation
>>>>>  ls               List pending relocations
>>>>>  clear            Clear pending relocations
>>>>>  en[able]         Enable shuffling
>>>>>  dis[able]        Disable shuffling
>>>>>
>>>>> Options:
>>>>>  -dc,  --only-dc           Apply only to named DC (create only)
>>>>>  -tp,  --thrift-port       Thrift port number (Default: 9160)
>>>>>  -p,   --port              JMX port number (Default: 7199)
>>>>>  -tf,  --thrift-framed     Enable framed transport for Thrift
>>>>> (Default: false)
>>>>>  -en,  --and-enable        Immediately enable shuffling (create only)
>>>>>  -H,   --help              Print help information
>>>>>  -h,   --host              JMX hostname or IP address (Default:
>>>>> localhost)
>>>>>  -th,  --thrift-host       Thrift hostname or IP address (Default: JMX
>>>>> host)
>>>>>
>>>>> Cheers
>>>>>
>>>>>    -----------------
>>>>> Aaron Morton
>>>>> Freelance Cassandra Developer
>>>>> New Zealand
>>>>>
>>>>> @aaronmorton
>>>>> http://www.thelastpickle.com
>>>>>
>>>>> On 3/02/2013, at 11:32 PM, Manu Zhang <ow...@gmail.com> wrote:
>>>>>
>>>>> On Sun 03 Feb 2013 05:45:56 AM CST, Daning Wang wrote:
>>>>>
>>>>> I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is
>>>>> that it can have multiple tokens in one node. but there is only one
>>>>> token in 1.1.6.
>>>>>
>>>>> how can I upgrade to 1.2.1 then breaking the token to take advantage
>>>>> of this feature? I went through this doc but it does not say how to
>>>>> change the num_token
>>>>>
>>>>> http://www.datastax.com/docs/1.2/install/upgrading
>>>>>
>>>>> Is there other doc about this upgrade path?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Daning
>>>>>
>>>>>
>>>>> I think for each node you need to change the num_token option in
>>>>> conf/cassandra.yaml (this only split the current range into num_token
>>>>> parts) and run the bin/cassandra-shuffle command (this spread it all over
>>>>> the ring).
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>

Re: Upgrade to Cassandra 1.2

Posted by Daning Wang <da...@netseer.com>.
Thanks Aaron and Manu.

Since we are using 1.1, there is no num_taken parameter. when I upgrade to
1.2, should I set num_token=1 to start up,  or I can set to other numbers?

Daning




On Tue, Feb 12, 2013 at 3:45 PM, Manu Zhang <ow...@gmail.com> wrote:

> num_tokens is only used at bootstrap
>
> I think it's also used in this case (already bootstrapped with num_tokens
> = 1 and now num_tokens > 1). Cassandra will split a node's current range
> into *num_tokens* parts and there should be no change to the amount of ring
> a node holds before shuffling.
>
>
> On Wed, Feb 13, 2013 at 3:12 AM, aaron morton <aa...@thelastpickle.com>wrote:
>
>> Restore the settings for num_tokens and intial_token to what they were
>> before you upgraded.
>> They should not be changed just because you are upgrading to 1.2, they
>> are used to enable virtual nodes. Which are not necessary to run 1.2.
>>
>> Cheers
>>
>>
>>    -----------------
>> Aaron Morton
>> Freelance Cassandra Developer
>> New Zealand
>>
>> @aaronmorton
>> http://www.thelastpickle.com
>>
>> On 13/02/2013, at 8:02 AM, Daning Wang <da...@netseer.com> wrote:
>>
>> No, I did not run shuffle since the upgrade was not successful.
>>
>> what do you mean "reverting the changes to num_tokens and inital_token"?
>> set num_tokens=1? initial_token should be ignored since it is not
>> bootstrap. right?
>>
>> Thanks,
>>
>> Daning
>>
>> On Tue, Feb 12, 2013 at 10:52 AM, aaron morton <aa...@thelastpickle.com>wrote:
>>
>>> Were you upgrading to 1.2 AND running the shuffle or just upgrading to
>>> 1.2?
>>>
>>> If you have not run shuffle I would suggest reverting the changes to
>>> num_tokens and inital_token. This is a guess because num_tokens is only
>>> used at bootstrap.
>>>
>>> Just get upgraded to 1.2 first, then do the shuffle when things are
>>> stable.
>>>
>>> Cheers
>>>
>>>    -----------------
>>> Aaron Morton
>>> Freelance Cassandra Developer
>>> New Zealand
>>>
>>> @aaronmorton
>>> http://www.thelastpickle.com
>>>
>>> On 12/02/2013, at 2:55 PM, Daning Wang <da...@netseer.com> wrote:
>>>
>>> Thanks Aaron.
>>>
>>> I tried to migrate existing cluster(ver 1.1.0) to 1.2.1 but failed.
>>>
>>> - I followed http://www.datastax.com/docs/1.2/install/upgrading, have
>>> merged cassandra.yaml, with follow parameter
>>>
>>> num_tokens: 256
>>> #initial_token: 0
>>>
>>> the initial_token is commented out, current token should be obtained
>>> from system schema
>>>
>>> - I did rolling upgrade, during the upgrade, I got "Borken Pipe" error
>>> from the nodes with old version, is that normal?
>>>
>>> - After I upgraded 3 nodes(still have 5 to go), I found it is total
>>> wrong, the first node upgraded owns 99.2 of ring
>>>
>>> [cassy@d5:/usr/local/cassy conf]$  ~/bin/nodetool -h localhost status
>>> Datacenter: datacenter1
>>> =======================
>>> Status=Up/Down
>>> |/ State=Normal/Leaving/Joining/Moving
>>> --  Address           Load       Tokens  Owns   Host ID
>>>               Rack
>>> DN  10.210.101.117    45.01 GB   254     99.2%
>>>  f4b6afe3-7e2e-4c61-96e8-12a529a31373  rack1
>>> UN  10.210.101.120    45.43 GB   256     0.4%
>>> 0fd912fb-3187-462b-8c8a-7d223751b649  rack1
>>> UN  10.210.101.111    27.08 GB   256     0.4%
>>> bd4c37bc-07dd-488b-bfab-e74e32c26f6e  rack1
>>>
>>>
>>> What was wrong? please help. I could provide more information if you
>>> need.
>>>
>>> Thanks,
>>>
>>> Daning
>>>
>>>
>>>
>>> On Mon, Feb 4, 2013 at 9:16 AM, aaron morton <aa...@thelastpickle.com>wrote:
>>>
>>>> There is a command line utility in 1.2 to shuffle the tokens…
>>>>
>>>> http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes
>>>>
>>>> $ ./cassandra-shuffle --help
>>>> Missing sub-command argument.
>>>> Usage: shuffle [options] <sub-command>
>>>>
>>>> Sub-commands:
>>>>  create           Initialize a new shuffle operation
>>>>  ls               List pending relocations
>>>>  clear            Clear pending relocations
>>>>  en[able]         Enable shuffling
>>>>  dis[able]        Disable shuffling
>>>>
>>>> Options:
>>>>  -dc,  --only-dc           Apply only to named DC (create only)
>>>>  -tp,  --thrift-port       Thrift port number (Default: 9160)
>>>>  -p,   --port              JMX port number (Default: 7199)
>>>>  -tf,  --thrift-framed     Enable framed transport for Thrift (Default:
>>>> false)
>>>>  -en,  --and-enable        Immediately enable shuffling (create only)
>>>>  -H,   --help              Print help information
>>>>  -h,   --host              JMX hostname or IP address (Default:
>>>> localhost)
>>>>  -th,  --thrift-host       Thrift hostname or IP address (Default: JMX
>>>> host)
>>>>
>>>> Cheers
>>>>
>>>>    -----------------
>>>> Aaron Morton
>>>> Freelance Cassandra Developer
>>>> New Zealand
>>>>
>>>> @aaronmorton
>>>> http://www.thelastpickle.com
>>>>
>>>> On 3/02/2013, at 11:32 PM, Manu Zhang <ow...@gmail.com> wrote:
>>>>
>>>> On Sun 03 Feb 2013 05:45:56 AM CST, Daning Wang wrote:
>>>>
>>>> I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is
>>>> that it can have multiple tokens in one node. but there is only one
>>>> token in 1.1.6.
>>>>
>>>> how can I upgrade to 1.2.1 then breaking the token to take advantage
>>>> of this feature? I went through this doc but it does not say how to
>>>> change the num_token
>>>>
>>>> http://www.datastax.com/docs/1.2/install/upgrading
>>>>
>>>> Is there other doc about this upgrade path?
>>>>
>>>> Thanks,
>>>>
>>>> Daning
>>>>
>>>>
>>>> I think for each node you need to change the num_token option in
>>>> conf/cassandra.yaml (this only split the current range into num_token
>>>> parts) and run the bin/cassandra-shuffle command (this spread it all over
>>>> the ring).
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>

Re: Upgrade to Cassandra 1.2

Posted by Manu Zhang <ow...@gmail.com>.
>
> num_tokens is only used at bootstrap

I think it's also used in this case (already bootstrapped with num_tokens =
1 and now num_tokens > 1). Cassandra will split a node's current range into
*num_tokens* parts and there should be no change to the amount of ring a
node holds before shuffling.


On Wed, Feb 13, 2013 at 3:12 AM, aaron morton <aa...@thelastpickle.com>wrote:

> Restore the settings for num_tokens and intial_token to what they were
> before you upgraded.
> They should not be changed just because you are upgrading to 1.2, they are
> used to enable virtual nodes. Which are not necessary to run 1.2.
>
> Cheers
>
>
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 13/02/2013, at 8:02 AM, Daning Wang <da...@netseer.com> wrote:
>
> No, I did not run shuffle since the upgrade was not successful.
>
> what do you mean "reverting the changes to num_tokens and inital_token"?
> set num_tokens=1? initial_token should be ignored since it is not
> bootstrap. right?
>
> Thanks,
>
> Daning
>
> On Tue, Feb 12, 2013 at 10:52 AM, aaron morton <aa...@thelastpickle.com>wrote:
>
>> Were you upgrading to 1.2 AND running the shuffle or just upgrading to
>> 1.2?
>>
>> If you have not run shuffle I would suggest reverting the changes to
>> num_tokens and inital_token. This is a guess because num_tokens is only
>> used at bootstrap.
>>
>> Just get upgraded to 1.2 first, then do the shuffle when things are
>> stable.
>>
>> Cheers
>>
>>    -----------------
>> Aaron Morton
>> Freelance Cassandra Developer
>> New Zealand
>>
>> @aaronmorton
>> http://www.thelastpickle.com
>>
>> On 12/02/2013, at 2:55 PM, Daning Wang <da...@netseer.com> wrote:
>>
>> Thanks Aaron.
>>
>> I tried to migrate existing cluster(ver 1.1.0) to 1.2.1 but failed.
>>
>> - I followed http://www.datastax.com/docs/1.2/install/upgrading, have
>> merged cassandra.yaml, with follow parameter
>>
>> num_tokens: 256
>> #initial_token: 0
>>
>> the initial_token is commented out, current token should be obtained from
>> system schema
>>
>> - I did rolling upgrade, during the upgrade, I got "Borken Pipe" error
>> from the nodes with old version, is that normal?
>>
>> - After I upgraded 3 nodes(still have 5 to go), I found it is total
>> wrong, the first node upgraded owns 99.2 of ring
>>
>> [cassy@d5:/usr/local/cassy conf]$  ~/bin/nodetool -h localhost status
>> Datacenter: datacenter1
>> =======================
>> Status=Up/Down
>> |/ State=Normal/Leaving/Joining/Moving
>> --  Address           Load       Tokens  Owns   Host ID
>>             Rack
>> DN  10.210.101.117    45.01 GB   254     99.2%
>>  f4b6afe3-7e2e-4c61-96e8-12a529a31373  rack1
>> UN  10.210.101.120    45.43 GB   256     0.4%
>> 0fd912fb-3187-462b-8c8a-7d223751b649  rack1
>> UN  10.210.101.111    27.08 GB   256     0.4%
>> bd4c37bc-07dd-488b-bfab-e74e32c26f6e  rack1
>>
>>
>> What was wrong? please help. I could provide more information if you need.
>>
>> Thanks,
>>
>> Daning
>>
>>
>>
>> On Mon, Feb 4, 2013 at 9:16 AM, aaron morton <aa...@thelastpickle.com>wrote:
>>
>>> There is a command line utility in 1.2 to shuffle the tokens…
>>>
>>> http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes
>>>
>>> $ ./cassandra-shuffle --help
>>> Missing sub-command argument.
>>> Usage: shuffle [options] <sub-command>
>>>
>>> Sub-commands:
>>>  create           Initialize a new shuffle operation
>>>  ls               List pending relocations
>>>  clear            Clear pending relocations
>>>  en[able]         Enable shuffling
>>>  dis[able]        Disable shuffling
>>>
>>> Options:
>>>  -dc,  --only-dc           Apply only to named DC (create only)
>>>  -tp,  --thrift-port       Thrift port number (Default: 9160)
>>>  -p,   --port              JMX port number (Default: 7199)
>>>  -tf,  --thrift-framed     Enable framed transport for Thrift (Default:
>>> false)
>>>  -en,  --and-enable        Immediately enable shuffling (create only)
>>>  -H,   --help              Print help information
>>>  -h,   --host              JMX hostname or IP address (Default:
>>> localhost)
>>>  -th,  --thrift-host       Thrift hostname or IP address (Default: JMX
>>> host)
>>>
>>> Cheers
>>>
>>>    -----------------
>>> Aaron Morton
>>> Freelance Cassandra Developer
>>> New Zealand
>>>
>>> @aaronmorton
>>> http://www.thelastpickle.com
>>>
>>> On 3/02/2013, at 11:32 PM, Manu Zhang <ow...@gmail.com> wrote:
>>>
>>> On Sun 03 Feb 2013 05:45:56 AM CST, Daning Wang wrote:
>>>
>>> I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is
>>> that it can have multiple tokens in one node. but there is only one
>>> token in 1.1.6.
>>>
>>> how can I upgrade to 1.2.1 then breaking the token to take advantage
>>> of this feature? I went through this doc but it does not say how to
>>> change the num_token
>>>
>>> http://www.datastax.com/docs/1.2/install/upgrading
>>>
>>> Is there other doc about this upgrade path?
>>>
>>> Thanks,
>>>
>>> Daning
>>>
>>>
>>> I think for each node you need to change the num_token option in
>>> conf/cassandra.yaml (this only split the current range into num_token
>>> parts) and run the bin/cassandra-shuffle command (this spread it all over
>>> the ring).
>>>
>>>
>>>
>>
>>
>
>

Re: Upgrade to Cassandra 1.2

Posted by aaron morton <aa...@thelastpickle.com>.
Restore the settings for num_tokens and intial_token to what they were before you upgraded. 
They should not be changed just because you are upgrading to 1.2, they are used to enable virtual nodes. Which are not necessary to run 1.2. 

Cheers


-----------------
Aaron Morton
Freelance Cassandra Developer
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 13/02/2013, at 8:02 AM, Daning Wang <da...@netseer.com> wrote:

> No, I did not run shuffle since the upgrade was not successful. 
> 
> what do you mean "reverting the changes to num_tokens and inital_token"? set num_tokens=1? initial_token should be ignored since it is not bootstrap. right?
> 
> Thanks,
> 
> Daning
> 
> On Tue, Feb 12, 2013 at 10:52 AM, aaron morton <aa...@thelastpickle.com> wrote:
> Were you upgrading to 1.2 AND running the shuffle or just upgrading to 1.2? 
> 
> If you have not run shuffle I would suggest reverting the changes to num_tokens and inital_token. This is a guess because num_tokens is only used at bootstrap. 
> 
> Just get upgraded to 1.2 first, then do the shuffle when things are stable. 
> 
> Cheers
> 
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> New Zealand
> 
> @aaronmorton
> http://www.thelastpickle.com
> 
> On 12/02/2013, at 2:55 PM, Daning Wang <da...@netseer.com> wrote:
> 
>> Thanks Aaron.
>> 
>> I tried to migrate existing cluster(ver 1.1.0) to 1.2.1 but failed.
>> 
>> - I followed http://www.datastax.com/docs/1.2/install/upgrading, have merged cassandra.yaml, with follow parameter
>> 
>> num_tokens: 256
>> #initial_token: 0
>> 
>> the initial_token is commented out, current token should be obtained from system schema
>> 
>> - I did rolling upgrade, during the upgrade, I got "Borken Pipe" error from the nodes with old version, is that normal?
>> 
>> - After I upgraded 3 nodes(still have 5 to go), I found it is total wrong, the first node upgraded owns 99.2 of ring
>> 
>> [cassy@d5:/usr/local/cassy conf]$  ~/bin/nodetool -h localhost status
>> Datacenter: datacenter1
>> =======================
>> Status=Up/Down
>> |/ State=Normal/Leaving/Joining/Moving
>> --  Address           Load       Tokens  Owns   Host ID                               Rack
>> DN  10.210.101.117    45.01 GB   254     99.2%  f4b6afe3-7e2e-4c61-96e8-12a529a31373  rack1
>> UN  10.210.101.120    45.43 GB   256     0.4%   0fd912fb-3187-462b-8c8a-7d223751b649  rack1
>> UN  10.210.101.111    27.08 GB   256     0.4%   bd4c37bc-07dd-488b-bfab-e74e32c26f6e  rack1
>> 
>> 
>> What was wrong? please help. I could provide more information if you need.
>> 
>> Thanks,
>> 
>> Daning
>> 
>> 
>> 
>> On Mon, Feb 4, 2013 at 9:16 AM, aaron morton <aa...@thelastpickle.com> wrote:
>> There is a command line utility in 1.2 to shuffle the tokens…
>> 
>> http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes
>> 
>> $ ./cassandra-shuffle --help
>> Missing sub-command argument.
>> Usage: shuffle [options] <sub-command>
>> 
>> Sub-commands:
>>  create           Initialize a new shuffle operation
>>  ls               List pending relocations
>>  clear            Clear pending relocations
>>  en[able]         Enable shuffling
>>  dis[able]        Disable shuffling
>> 
>> Options:
>>  -dc,  --only-dc           Apply only to named DC (create only)
>>  -tp,  --thrift-port       Thrift port number (Default: 9160)
>>  -p,   --port              JMX port number (Default: 7199)
>>  -tf,  --thrift-framed     Enable framed transport for Thrift (Default: false)
>>  -en,  --and-enable        Immediately enable shuffling (create only)
>>  -H,   --help              Print help information
>>  -h,   --host              JMX hostname or IP address (Default: localhost)
>>  -th,  --thrift-host       Thrift hostname or IP address (Default: JMX host)
>> 
>> Cheers
>> 
>> -----------------
>> Aaron Morton
>> Freelance Cassandra Developer
>> New Zealand
>> 
>> @aaronmorton
>> http://www.thelastpickle.com
>> 
>> On 3/02/2013, at 11:32 PM, Manu Zhang <ow...@gmail.com> wrote:
>> 
>>> On Sun 03 Feb 2013 05:45:56 AM CST, Daning Wang wrote:
>>>> I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is
>>>> that it can have multiple tokens in one node. but there is only one
>>>> token in 1.1.6.
>>>> 
>>>> how can I upgrade to 1.2.1 then breaking the token to take advantage
>>>> of this feature? I went through this doc but it does not say how to
>>>> change the num_token
>>>> 
>>>> http://www.datastax.com/docs/1.2/install/upgrading
>>>> 
>>>> Is there other doc about this upgrade path?
>>>> 
>>>> Thanks,
>>>> 
>>>> Daning
>>> 
>>> I think for each node you need to change the num_token option in conf/cassandra.yaml (this only split the current range into num_token parts) and run the bin/cassandra-shuffle command (this spread it all over the ring).
>> 
>> 
> 
> 


Re: Upgrade to Cassandra 1.2

Posted by Daning Wang <da...@netseer.com>.
No, I did not run shuffle since the upgrade was not successful.

what do you mean "reverting the changes to num_tokens and inital_token"?
set num_tokens=1? initial_token should be ignored since it is not
bootstrap. right?

Thanks,

Daning

On Tue, Feb 12, 2013 at 10:52 AM, aaron morton <aa...@thelastpickle.com>wrote:

> Were you upgrading to 1.2 AND running the shuffle or just upgrading to
> 1.2?
>
> If you have not run shuffle I would suggest reverting the changes to
> num_tokens and inital_token. This is a guess because num_tokens is only
> used at bootstrap.
>
> Just get upgraded to 1.2 first, then do the shuffle when things are
> stable.
>
> Cheers
>
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 12/02/2013, at 2:55 PM, Daning Wang <da...@netseer.com> wrote:
>
> Thanks Aaron.
>
> I tried to migrate existing cluster(ver 1.1.0) to 1.2.1 but failed.
>
> - I followed http://www.datastax.com/docs/1.2/install/upgrading, have
> merged cassandra.yaml, with follow parameter
>
> num_tokens: 256
> #initial_token: 0
>
> the initial_token is commented out, current token should be obtained from
> system schema
>
> - I did rolling upgrade, during the upgrade, I got "Borken Pipe" error
> from the nodes with old version, is that normal?
>
> - After I upgraded 3 nodes(still have 5 to go), I found it is total wrong,
> the first node upgraded owns 99.2 of ring
>
> [cassy@d5:/usr/local/cassy conf]$  ~/bin/nodetool -h localhost status
> Datacenter: datacenter1
> =======================
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address           Load       Tokens  Owns   Host ID
>             Rack
> DN  10.210.101.117    45.01 GB   254     99.2%
>  f4b6afe3-7e2e-4c61-96e8-12a529a31373  rack1
> UN  10.210.101.120    45.43 GB   256     0.4%
> 0fd912fb-3187-462b-8c8a-7d223751b649  rack1
> UN  10.210.101.111    27.08 GB   256     0.4%
> bd4c37bc-07dd-488b-bfab-e74e32c26f6e  rack1
>
>
> What was wrong? please help. I could provide more information if you need.
>
> Thanks,
>
> Daning
>
>
>
> On Mon, Feb 4, 2013 at 9:16 AM, aaron morton <aa...@thelastpickle.com>wrote:
>
>> There is a command line utility in 1.2 to shuffle the tokens…
>>
>> http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes
>>
>> $ ./cassandra-shuffle --help
>> Missing sub-command argument.
>> Usage: shuffle [options] <sub-command>
>>
>> Sub-commands:
>>  create           Initialize a new shuffle operation
>>  ls               List pending relocations
>>  clear            Clear pending relocations
>>  en[able]         Enable shuffling
>>  dis[able]        Disable shuffling
>>
>> Options:
>>  -dc,  --only-dc           Apply only to named DC (create only)
>>  -tp,  --thrift-port       Thrift port number (Default: 9160)
>>  -p,   --port              JMX port number (Default: 7199)
>>  -tf,  --thrift-framed     Enable framed transport for Thrift (Default:
>> false)
>>  -en,  --and-enable        Immediately enable shuffling (create only)
>>  -H,   --help              Print help information
>>  -h,   --host              JMX hostname or IP address (Default: localhost)
>>  -th,  --thrift-host       Thrift hostname or IP address (Default: JMX
>> host)
>>
>> Cheers
>>
>>    -----------------
>> Aaron Morton
>> Freelance Cassandra Developer
>> New Zealand
>>
>> @aaronmorton
>> http://www.thelastpickle.com
>>
>> On 3/02/2013, at 11:32 PM, Manu Zhang <ow...@gmail.com> wrote:
>>
>> On Sun 03 Feb 2013 05:45:56 AM CST, Daning Wang wrote:
>>
>> I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is
>> that it can have multiple tokens in one node. but there is only one
>> token in 1.1.6.
>>
>> how can I upgrade to 1.2.1 then breaking the token to take advantage
>> of this feature? I went through this doc but it does not say how to
>> change the num_token
>>
>> http://www.datastax.com/docs/1.2/install/upgrading
>>
>> Is there other doc about this upgrade path?
>>
>> Thanks,
>>
>> Daning
>>
>>
>> I think for each node you need to change the num_token option in
>> conf/cassandra.yaml (this only split the current range into num_token
>> parts) and run the bin/cassandra-shuffle command (this spread it all over
>> the ring).
>>
>>
>>
>
>

Re: Upgrade to Cassandra 1.2

Posted by aaron morton <aa...@thelastpickle.com>.
Were you upgrading to 1.2 AND running the shuffle or just upgrading to 1.2? 

If you have not run shuffle I would suggest reverting the changes to num_tokens and inital_token. This is a guess because num_tokens is only used at bootstrap. 

Just get upgraded to 1.2 first, then do the shuffle when things are stable. 

Cheers

-----------------
Aaron Morton
Freelance Cassandra Developer
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 12/02/2013, at 2:55 PM, Daning Wang <da...@netseer.com> wrote:

> Thanks Aaron.
> 
> I tried to migrate existing cluster(ver 1.1.0) to 1.2.1 but failed.
> 
> - I followed http://www.datastax.com/docs/1.2/install/upgrading, have merged cassandra.yaml, with follow parameter
> 
> num_tokens: 256
> #initial_token: 0
> 
> the initial_token is commented out, current token should be obtained from system schema
> 
> - I did rolling upgrade, during the upgrade, I got "Borken Pipe" error from the nodes with old version, is that normal?
> 
> - After I upgraded 3 nodes(still have 5 to go), I found it is total wrong, the first node upgraded owns 99.2 of ring
> 
> [cassy@d5:/usr/local/cassy conf]$  ~/bin/nodetool -h localhost status
> Datacenter: datacenter1
> =======================
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address           Load       Tokens  Owns   Host ID                               Rack
> DN  10.210.101.117    45.01 GB   254     99.2%  f4b6afe3-7e2e-4c61-96e8-12a529a31373  rack1
> UN  10.210.101.120    45.43 GB   256     0.4%   0fd912fb-3187-462b-8c8a-7d223751b649  rack1
> UN  10.210.101.111    27.08 GB   256     0.4%   bd4c37bc-07dd-488b-bfab-e74e32c26f6e  rack1
> 
> 
> What was wrong? please help. I could provide more information if you need.
> 
> Thanks,
> 
> Daning
> 
> 
> 
> On Mon, Feb 4, 2013 at 9:16 AM, aaron morton <aa...@thelastpickle.com> wrote:
> There is a command line utility in 1.2 to shuffle the tokens…
> 
> http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes
> 
> $ ./cassandra-shuffle --help
> Missing sub-command argument.
> Usage: shuffle [options] <sub-command>
> 
> Sub-commands:
>  create           Initialize a new shuffle operation
>  ls               List pending relocations
>  clear            Clear pending relocations
>  en[able]         Enable shuffling
>  dis[able]        Disable shuffling
> 
> Options:
>  -dc,  --only-dc           Apply only to named DC (create only)
>  -tp,  --thrift-port       Thrift port number (Default: 9160)
>  -p,   --port              JMX port number (Default: 7199)
>  -tf,  --thrift-framed     Enable framed transport for Thrift (Default: false)
>  -en,  --and-enable        Immediately enable shuffling (create only)
>  -H,   --help              Print help information
>  -h,   --host              JMX hostname or IP address (Default: localhost)
>  -th,  --thrift-host       Thrift hostname or IP address (Default: JMX host)
> 
> Cheers
> 
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> New Zealand
> 
> @aaronmorton
> http://www.thelastpickle.com
> 
> On 3/02/2013, at 11:32 PM, Manu Zhang <ow...@gmail.com> wrote:
> 
>> On Sun 03 Feb 2013 05:45:56 AM CST, Daning Wang wrote:
>>> I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is
>>> that it can have multiple tokens in one node. but there is only one
>>> token in 1.1.6.
>>> 
>>> how can I upgrade to 1.2.1 then breaking the token to take advantage
>>> of this feature? I went through this doc but it does not say how to
>>> change the num_token
>>> 
>>> http://www.datastax.com/docs/1.2/install/upgrading
>>> 
>>> Is there other doc about this upgrade path?
>>> 
>>> Thanks,
>>> 
>>> Daning
>> 
>> I think for each node you need to change the num_token option in conf/cassandra.yaml (this only split the current range into num_token parts) and run the bin/cassandra-shuffle command (this spread it all over the ring).
> 
> 


Re: Upgrade to Cassandra 1.2

Posted by Daning Wang <da...@netseer.com>.
Thanks Aaron.

I tried to migrate existing cluster(ver 1.1.0) to 1.2.1 but failed.

- I followed http://www.datastax.com/docs/1.2/install/upgrading, have
merged cassandra.yaml, with follow parameter

num_tokens: 256
#initial_token: 0

the initial_token is commented out, current token should be obtained from
system schema

- I did rolling upgrade, during the upgrade, I got "Borken Pipe" error from
the nodes with old version, is that normal?

- After I upgraded 3 nodes(still have 5 to go), I found it is total wrong,
the first node upgraded owns 99.2 of ring

[cassy@d5:/usr/local/cassy conf]$  ~/bin/nodetool -h localhost status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address           Load       Tokens  Owns   Host ID
          Rack
DN  10.210.101.117    45.01 GB   254     99.2%
 f4b6afe3-7e2e-4c61-96e8-12a529a31373  rack1
UN  10.210.101.120    45.43 GB   256     0.4%
0fd912fb-3187-462b-8c8a-7d223751b649  rack1
UN  10.210.101.111    27.08 GB   256     0.4%
bd4c37bc-07dd-488b-bfab-e74e32c26f6e  rack1


What was wrong? please help. I could provide more information if you need.

Thanks,

Daning



On Mon, Feb 4, 2013 at 9:16 AM, aaron morton <aa...@thelastpickle.com>wrote:

> There is a command line utility in 1.2 to shuffle the tokens…
>
> http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes
>
> $ ./cassandra-shuffle --help
> Missing sub-command argument.
> Usage: shuffle [options] <sub-command>
>
> Sub-commands:
>  create           Initialize a new shuffle operation
>  ls               List pending relocations
>  clear            Clear pending relocations
>  en[able]         Enable shuffling
>  dis[able]        Disable shuffling
>
> Options:
>  -dc,  --only-dc           Apply only to named DC (create only)
>  -tp,  --thrift-port       Thrift port number (Default: 9160)
>  -p,   --port              JMX port number (Default: 7199)
>  -tf,  --thrift-framed     Enable framed transport for Thrift (Default:
> false)
>  -en,  --and-enable        Immediately enable shuffling (create only)
>  -H,   --help              Print help information
>  -h,   --host              JMX hostname or IP address (Default: localhost)
>  -th,  --thrift-host       Thrift hostname or IP address (Default: JMX
> host)
>
> Cheers
>
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 3/02/2013, at 11:32 PM, Manu Zhang <ow...@gmail.com> wrote:
>
> On Sun 03 Feb 2013 05:45:56 AM CST, Daning Wang wrote:
>
> I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is
> that it can have multiple tokens in one node. but there is only one
> token in 1.1.6.
>
> how can I upgrade to 1.2.1 then breaking the token to take advantage
> of this feature? I went through this doc but it does not say how to
> change the num_token
>
> http://www.datastax.com/docs/1.2/install/upgrading
>
> Is there other doc about this upgrade path?
>
> Thanks,
>
> Daning
>
>
> I think for each node you need to change the num_token option in
> conf/cassandra.yaml (this only split the current range into num_token
> parts) and run the bin/cassandra-shuffle command (this spread it all over
> the ring).
>
>
>

Re: Upgrade to Cassandra 1.2

Posted by aaron morton <aa...@thelastpickle.com>.
There is a command line utility in 1.2 to shuffle the tokens…

http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes

$ ./cassandra-shuffle --help
Missing sub-command argument.
Usage: shuffle [options] <sub-command>

Sub-commands:
 create           Initialize a new shuffle operation
 ls               List pending relocations
 clear            Clear pending relocations
 en[able]         Enable shuffling
 dis[able]        Disable shuffling

Options:
 -dc,  --only-dc           Apply only to named DC (create only)
 -tp,  --thrift-port       Thrift port number (Default: 9160)
 -p,   --port              JMX port number (Default: 7199)
 -tf,  --thrift-framed     Enable framed transport for Thrift (Default: false)
 -en,  --and-enable        Immediately enable shuffling (create only)
 -H,   --help              Print help information
 -h,   --host              JMX hostname or IP address (Default: localhost)
 -th,  --thrift-host       Thrift hostname or IP address (Default: JMX host)

Cheers

-----------------
Aaron Morton
Freelance Cassandra Developer
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 3/02/2013, at 11:32 PM, Manu Zhang <ow...@gmail.com> wrote:

> On Sun 03 Feb 2013 05:45:56 AM CST, Daning Wang wrote:
>> I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is
>> that it can have multiple tokens in one node. but there is only one
>> token in 1.1.6.
>> 
>> how can I upgrade to 1.2.1 then breaking the token to take advantage
>> of this feature? I went through this doc but it does not say how to
>> change the num_token
>> 
>> http://www.datastax.com/docs/1.2/install/upgrading
>> 
>> Is there other doc about this upgrade path?
>> 
>> Thanks,
>> 
>> Daning
> 
> I think for each node you need to change the num_token option in conf/cassandra.yaml (this only split the current range into num_token parts) and run the bin/cassandra-shuffle command (this spread it all over the ring).


Re: Upgrade to Cassandra 1.2

Posted by Manu Zhang <ow...@gmail.com>.
On Sun 03 Feb 2013 05:45:56 AM CST, Daning Wang wrote:
> I'd like to upgrade from 1.1.6 to 1.2.1, one big feature in 1.2 is
> that it can have multiple tokens in one node. but there is only one
> token in 1.1.6.
>
> how can I upgrade to 1.2.1 then breaking the token to take advantage
> of this feature? I went through this doc but it does not say how to
> change the num_token
>
> http://www.datastax.com/docs/1.2/install/upgrading
>
>  Is there other doc about this upgrade path?
>
> Thanks,
>
> Daning

I think for each node you need to change the num_token option in 
conf/cassandra.yaml (this only split the current range into num_token 
parts) and run the bin/cassandra-shuffle command (this spread it all 
over the ring).