You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by DuyHai Doan <do...@gmail.com> on 2019/02/14 19:43:20 UTC

Usage of allocate_tokens_for_keyspace for a new cluster

Hello users

By looking at the mailing list archive, there was already some questions
about the flag "allocate_tokens_for_keyspace" from cassandra.yaml

I'm starting a fresh new cluster (with 0 data).

The keyspace used by the project is raw_data so I
set allocate_tokens_for_keyspace = raw_data in the cassandra.yaml

However the cluster fails to start, the keyspace does not exist yet (of
course, it is not yet created).

So to me it is like chicken and egg issue:

1. You create a fresh new cluster with the option
"allocate_tokens_for_keyspace" commented out, in this case you cannot
optimize the token allocations
2. You create a fresh new cluster with option
"allocate_tokens_for_keyspace" pointing to a not-yet created keyspace, it
fails (logically)

The third option is:

 a. create a new cluster with "allocate_tokens_for_keyspace" commented out
 b. create the keyspace "raw_data"
 c. set allocate_tokens_for_keyspace = raw_data

My question is, since after step a. the token allocation is *already* done,
what's the point setting the flag in step c. ????

Regards

Duy Hai DOAN

Re: Usage of allocate_tokens_for_keyspace for a new cluster

Posted by Ahmed Eljami <ah...@gmail.com>.
Except that the doc concerns the latest version (4..0) and there is a Jira (
https://issues.apache.org/jira/browse/CASSANDRA-14557) not yet resolved who
introduces a new parameter  default_keyspace_rf

So I'm not sur if it will be the right procedure on 4.0 for this parameter
( allocate_tokens_for_keyspace ).

Re: Usage of allocate_tokens_for_keyspace for a new cluster

Posted by Jean Carlo <je...@gmail.com>.
Hello,

I find this discussion very useful. I did not see information about this
topic in cassandra apache web page. Shouldn't we have a instruction page to
create a new fresh cluster following the right instructions to use
correctly the option allocate_tokens_for_keyspace ?


Jean Carlo

"The best way to predict the future is to invent it" Alan Kay


On Thu, Feb 14, 2019 at 8:52 PM DuyHai Doan <do...@gmail.com> wrote:

> Ok thanks John
>
> On Thu, Feb 14, 2019 at 8:51 PM Jonathan Haddad <jo...@jonhaddad.com> wrote:
>
>> Create the first node, setting the tokens manually.
>> Create the keyspace.
>> Add the rest of the nodes with the allocate tokens uncommented.
>>
>> On Thu, Feb 14, 2019 at 11:43 AM DuyHai Doan <do...@gmail.com>
>> wrote:
>>
>>> Hello users
>>>
>>> By looking at the mailing list archive, there was already some questions
>>> about the flag "allocate_tokens_for_keyspace" from cassandra.yaml
>>>
>>> I'm starting a fresh new cluster (with 0 data).
>>>
>>> The keyspace used by the project is raw_data so I
>>> set allocate_tokens_for_keyspace = raw_data in the cassandra.yaml
>>>
>>> However the cluster fails to start, the keyspace does not exist yet (of
>>> course, it is not yet created).
>>>
>>> So to me it is like chicken and egg issue:
>>>
>>> 1. You create a fresh new cluster with the option
>>> "allocate_tokens_for_keyspace" commented out, in this case you cannot
>>> optimize the token allocations
>>> 2. You create a fresh new cluster with option
>>> "allocate_tokens_for_keyspace" pointing to a not-yet created keyspace, it
>>> fails (logically)
>>>
>>> The third option is:
>>>
>>>  a. create a new cluster with "allocate_tokens_for_keyspace" commented
>>> out
>>>  b. create the keyspace "raw_data"
>>>  c. set allocate_tokens_for_keyspace = raw_data
>>>
>>> My question is, since after step a. the token allocation is *already*
>>> done, what's the point setting the flag in step c. ????
>>>
>>> Regards
>>>
>>> Duy Hai DOAN
>>>
>> --
>> Jon Haddad
>> http://www.rustyrazorblade.com
>> twitter: rustyrazorblade
>>
>

Re: Usage of allocate_tokens_for_keyspace for a new cluster

Posted by DuyHai Doan <do...@gmail.com>.
Ok thanks John

On Thu, Feb 14, 2019 at 8:51 PM Jonathan Haddad <jo...@jonhaddad.com> wrote:

> Create the first node, setting the tokens manually.
> Create the keyspace.
> Add the rest of the nodes with the allocate tokens uncommented.
>
> On Thu, Feb 14, 2019 at 11:43 AM DuyHai Doan <do...@gmail.com> wrote:
>
>> Hello users
>>
>> By looking at the mailing list archive, there was already some questions
>> about the flag "allocate_tokens_for_keyspace" from cassandra.yaml
>>
>> I'm starting a fresh new cluster (with 0 data).
>>
>> The keyspace used by the project is raw_data so I
>> set allocate_tokens_for_keyspace = raw_data in the cassandra.yaml
>>
>> However the cluster fails to start, the keyspace does not exist yet (of
>> course, it is not yet created).
>>
>> So to me it is like chicken and egg issue:
>>
>> 1. You create a fresh new cluster with the option
>> "allocate_tokens_for_keyspace" commented out, in this case you cannot
>> optimize the token allocations
>> 2. You create a fresh new cluster with option
>> "allocate_tokens_for_keyspace" pointing to a not-yet created keyspace, it
>> fails (logically)
>>
>> The third option is:
>>
>>  a. create a new cluster with "allocate_tokens_for_keyspace" commented out
>>  b. create the keyspace "raw_data"
>>  c. set allocate_tokens_for_keyspace = raw_data
>>
>> My question is, since after step a. the token allocation is *already*
>> done, what's the point setting the flag in step c. ????
>>
>> Regards
>>
>> Duy Hai DOAN
>>
> --
> Jon Haddad
> http://www.rustyrazorblade.com
> twitter: rustyrazorblade
>

Re: Usage of allocate_tokens_for_keyspace for a new cluster

Posted by Jonathan Haddad <jo...@jonhaddad.com>.
Create the first node, setting the tokens manually.
Create the keyspace.
Add the rest of the nodes with the allocate tokens uncommented.

On Thu, Feb 14, 2019 at 11:43 AM DuyHai Doan <do...@gmail.com> wrote:

> Hello users
>
> By looking at the mailing list archive, there was already some questions
> about the flag "allocate_tokens_for_keyspace" from cassandra.yaml
>
> I'm starting a fresh new cluster (with 0 data).
>
> The keyspace used by the project is raw_data so I
> set allocate_tokens_for_keyspace = raw_data in the cassandra.yaml
>
> However the cluster fails to start, the keyspace does not exist yet (of
> course, it is not yet created).
>
> So to me it is like chicken and egg issue:
>
> 1. You create a fresh new cluster with the option
> "allocate_tokens_for_keyspace" commented out, in this case you cannot
> optimize the token allocations
> 2. You create a fresh new cluster with option
> "allocate_tokens_for_keyspace" pointing to a not-yet created keyspace, it
> fails (logically)
>
> The third option is:
>
>  a. create a new cluster with "allocate_tokens_for_keyspace" commented out
>  b. create the keyspace "raw_data"
>  c. set allocate_tokens_for_keyspace = raw_data
>
> My question is, since after step a. the token allocation is *already*
> done, what's the point setting the flag in step c. ????
>
> Regards
>
> Duy Hai DOAN
>
-- 
Jon Haddad
http://www.rustyrazorblade.com
twitter: rustyrazorblade