From user-return-31523-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Wed Jan 30 19:44:01 2013 Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A1AFDEACE for ; Wed, 30 Jan 2013 19:44:01 +0000 (UTC) Received: (qmail 59996 invoked by uid 500); 30 Jan 2013 19:43:58 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 59965 invoked by uid 500); 30 Jan 2013 19:43:58 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 59957 invoked by uid 99); 30 Jan 2013 19:43:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 19:43:58 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.193.54.208] (HELO voxeo.com) (66.193.54.208) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 19:43:54 +0000 Received: from [172.16.7.141] (account zli@voxeo.com [172.16.7.141] verified) by voxeo.com (CommuniGate Pro SMTP 5.3.8) with ESMTPSA id 128500384 for user@cassandra.apache.org; Wed, 30 Jan 2013 19:43:33 +0000 From: Zhong Li Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: multipart/alternative; boundary=Apple-Mail-3--984276605 Subject: Re: Understanding Virtual Nodes on Cassandra 1.2 Date: Wed, 30 Jan 2013 14:43:32 -0500 In-Reply-To: <2617CF7F-8E54-4C5E-85E4-89DB1C121F3D@voxeo.com> To: user@cassandra.apache.org References: <1C1F0670-BD45-4240-8C09-C35711E8AE3C@voxeo.com> <65B95AB7-966E-4FC1-8290-3AB17827DEAC@voxeo.com> <51093A80.1020805@gmail.com> <2617CF7F-8E54-4C5E-85E4-89DB1C121F3D@voxeo.com> Message-Id: <43163F37-E932-4B72-AF62-9AD7ACE38481@voxeo.com> X-Mailer: Apple Mail (2.1085) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-3--984276605 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Are there tickets/documents explain how data be replicated on Virtual = Nodes? If there are multiple tokens on one physical host, may a chance = two or more tokens chosen by replication strategy located on same host? = If move/remove/add a token =20 manually, does Cassandra Engine validate the case? Thanks. On Jan 30, 2013, at 12:46 PM, Zhong Li wrote: >> You add a physical node and that in turn adds num_token tokens to the = ring. >=20 > No, I am talking about Virtual Nodes with order preserving = partitioner. For an existing host with multiple tokens setting list on = cassandra.inital_token. After initial bootstrapping, the host will not = aware changes of cassandra.inital_token. If I want add a new token( = virtual node), I have to rebuild the host with new token list. >=20 > My question is if there is way to add a virtual nodes without rebuild = it? >=20 > Thanks, >=20 > On Jan 30, 2013, at 10:21 AM, Manu Zhang wrote: >=20 >> On Wed 30 Jan 2013 02:29:27 AM CST, Zhong Li wrote: >>> One more question, can I add a virtual node manually without reboot >>> and rebuild a host data? >>>=20 >>> I checked nodetool command, there is no option to add a node. >>>=20 >>> Thanks. >>>=20 >>> Zhong >>>=20 >>>=20 >>> On Jan 29, 2013, at 11:09 AM, Zhong Li wrote: >>>=20 >>>> I was misunderstood this >>>> http://www.datastax.com/dev/blog/virtual-nodes-in-cassandra-1-2 , >>>> especially >>>> "If you want to get started with vnodes on a fresh cluster, = however, >>>> that is fairly straightforward. Just don=92t set the >>>> |initial_token| parameter in your|conf/cassandra.yaml| and instead >>>> enable the |num_tokens| parameter. A good default value for this is = 256" >>>>=20 >>>> Also I couldn't find document about set multiple tokens >>>> for cassandra.inital_token >>>>=20 >>>> Anyway, I just tested, it does work to set comma separated list of >>>> tokens. >>>>=20 >>>> Thanks, >>>>=20 >>>> Zhong >>>>=20 >>>>=20 >>>> On Jan 29, 2013, at 3:06 AM, aaron morton wrote: >>>>=20 >>>>>> After I searched some document on Datastax website and some old >>>>>> ticket, seems that it works for random partitioner only, and = leaves >>>>>> order preserved partitioner out of the luck. >>>>> Links ? >>>>>=20 >>>>>> or allow add Virtual Nodes manually? >>>>> If not looked into it but there is a cassandra.inital_token = startup >>>>> param that takes a comma separated list of tokens for the node. >>>>>=20 >>>>> There also appears to be support for the ordered partitions to >>>>> generate random tokens. >>>>>=20 >>>>> But you would still have the problem of having to balance your row >>>>> keys around the token space. >>>>>=20 >>>>> Cheers >>>>> ----------------- >>>>> Aaron Morton >>>>> Freelance Cassandra Developer >>>>> New Zealand >>>>>=20 >>>>> @aaronmorton >>>>> http://www.thelastpickle.com >>>>>=20 >>>>> On 29/01/2013, at 10:31 AM, Zhong Li >>>> > wrote: >>>>>=20 >>>>>> Hi All, >>>>>>=20 >>>>>> Virtual Nodes is great feature. After I searched some document on >>>>>> Datastax website and some old ticket, seems that it works for >>>>>> random partitioner only, and leaves order preserved partitioner = out >>>>>> of the luck. I may misunderstand, please correct me. if it = doesn't >>>>>> love order preserved partitioner, would be possible to add = support >>>>>> multiple initial_token(s) for order preserved partitioner or >>>>>> allow add Virtual Nodes manually? >>>>>>=20 >>>>>> Thanks, >>>>>>=20 >>>>>> Zhong >>>>>=20 >>>>=20 >>>=20 >>=20 >> You add a physical node and that in turn adds num_token tokens to the = ring. >=20 --Apple-Mail-3--984276605 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 Are = there tickets/documents explain how data be replicated on Virtual Nodes? = If there are multiple tokens on one physical host, may a chance two or = more tokens chosen by replication strategy located on same host? If = move/remove/add a token   
manually, does Cassandra = Engine validate the = case?

Thanks.


<= div>On Jan 30, 2013, at 12:46 PM, Zhong Li wrote:

You add a physical node and that in turn adds = num_token tokens to the = ring.

No, I am = talking about Virtual Nodes with order preserving partitioner. For an = existing host with multiple tokens setting list on cassandra.inital_token. If I want add a = new token( virtual node), I have to rebuild the host with new token = list.

My question is if there is way to = add a virtual nodes without rebuild = it?

Thanks,

On = Jan 30, 2013, at 10:21 AM, Manu Zhang wrote:

On = Wed 30 Jan 2013 02:29:27 AM CST, Zhong Li wrote:
One more question, can I add a virtual node manually = without reboot
and rebuild a = host data?

I checked = nodetool command, there is no option to add a = node.

Thanks.

Zhong


On Jan 29, = 2013, at 11:09 AM, Zhong Li wrote:

I was misunderstood = this
h= ttp://www.datastax.com/dev/blog/virtual-nodes-in-cassandra-1-2 = ,
especially
"If you want to get started with = vnodes on a fresh cluster, = however,
that is fairly straightforward. = Just don=92t set the
|initial_token| parameter in = your|conf/cassandra.yaml| and = instead
enable the |num_tokens| parameter. A good default value = for this is 256"

Also I couldn't find document = about set multiple tokens
for = cassandra.inital_token

Anyway, I just tested, it does = work to set  comma separated list = of
tokens.

Thanks,

Zhong


On Jan 29, 2013, at 3:06 AM, = aaron morton wrote:

After I searched some document = on Datastax website and some = old
ticket, seems that it works for = random partitioner only, and = leaves
order preserved partitioner out = of the = luck.
Links = ?

 or allow add Virtual = Nodes = manually?
If = not looked into it but there is a cassandra.inital_token = startup
param = that takes a comma separated list of tokens for the = node.

There = also appears to be support for the ordered partitions = to
generate= random tokens.

But = you would still have the problem of having to balance your = row
keys = around the token = space.

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

@aaronmorton
http://www.thelastpickle.com = <http://www.thelastpickle.com/&g= t;

On = 29/01/2013, at 10:31 AM, Zhong Li <zli@voxeo.com
<mailto:zli@voxeo.com>> = wrote:

Hi = All,

Virtual Nodes is great feature. = After I searched some document = on
Datastax website and some old = ticket, seems that it works = for
random partitioner only, and = leaves order preserved partitioner = out
of the luck. I may = misunderstand, please correct me. if it = doesn't
love order preserved = partitioner, would be possible to add = support
multiple initial_token(s) for =  order preserved partitioner =  or
allow add Virtual Nodes = manually?

Thanks,

Zhong




You add a physical node and that in = turn adds num_token tokens to the = ring.


<= /body>= --Apple-Mail-3--984276605--