Return-Path: Delivered-To: apmail-incubator-cassandra-dev-archive@minotaur.apache.org Received: (qmail 88103 invoked from network); 4 Apr 2009 07:09:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Apr 2009 07:09:24 -0000 Received: (qmail 21425 invoked by uid 500); 4 Apr 2009 07:09:24 -0000 Delivered-To: apmail-incubator-cassandra-dev-archive@incubator.apache.org Received: (qmail 21380 invoked by uid 500); 4 Apr 2009 07:09:24 -0000 Mailing-List: contact cassandra-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-dev@incubator.apache.org Received: (qmail 21370 invoked by uid 99); 4 Apr 2009 07:09:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Apr 2009 07:09:24 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of schumi.han@gmail.com designates 209.85.198.240 as permitted sender) Received: from [209.85.198.240] (HELO rv-out-0708.google.com) (209.85.198.240) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Apr 2009 07:09:17 +0000 Received: by rv-out-0708.google.com with SMTP id b17so1225003rvf.0 for ; Sat, 04 Apr 2009 00:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=uVKXg14/aeQ6I8C4GPwMyZRfP2eSMUVy45gcHWAS2ss=; b=BLgcLpSSOmPYJnq0Kx2LM9T9Qfvgf7GS5N6mM+H3aS6YnnqDPgHisJ62i/79BctIb1 nc9zEAEa32TsI37xiGs0AIZnW/bmPSkEnMT9mwlTsZrf1nlsJ19Xv86I3muYkAyYdVtP 9z4l8kCKR7drDZPoAOXtNZmzmUN2ZqOMTm6L0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=LpwJoppRPoyhB4tMfU7VYCA1WP7k/a+Y/m71IoC+Xw0+cp7JS0XLkCXnLUKr/g1woX HX9IuwPobqBnR79iibiv2/2VCaxBFWvXdKUWXOBPmoelOHoDv3ql6B17boqMcAMXEuzi 0o74YYUdIveEuD9oYB68KOAWIJbTFIJUz+Z9A= MIME-Version: 1.0 Received: by 10.115.48.12 with SMTP id a12mr1023387wak.161.1238828936967; Sat, 04 Apr 2009 00:08:56 -0700 (PDT) In-Reply-To: References: Date: Sat, 4 Apr 2009 15:08:56 +0800 Message-ID: <4e777ed10904040008x2ef96deau957fd0f555b5a16d@mail.gmail.com> Subject: Re: OPHF From: Zhu Han To: cassandra-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=0016e64beb54b9b5a70466b5564b X-Virus-Checked: Checked by ClamAV on apache.org --0016e64beb54b9b5a70466b5564b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Jun, This has be implemented in cassandra. When a node is added to the system. it would gossip it's token to other peers. These peers would re-compute the range to endpoint map after receiving the notification from the Gossiper. And then the ranges would be transfered from one endpoint to another if the mapping is changed for it. You can check LeaveJoinProtocolImpl.Java for the implementation. best regards, hanzhu On Fri, Apr 3, 2009 at 1:09 AM, Jun Rao wrote: > > If the partitioner maps String->token, then the load balancer can be > oblivious to the partitioner and do the balancing by reassigning tokens to > EndPoint. On the other hand, if the partitioner maps String->EndPoint, then > the load balancer has to tell the partitioner that it has changed some of > the decision the partitioner already made. How will this work? > > Jun > IBM Almaden Research Center > K55/B1, 650 Harry Road, San Jose, CA 95120-6099 > > junrao@almaden.ibm.com > > > Jonathan Ellis wrote on 04/02/2009 09:51:26 AM: > > > > > On Thu, Apr 2, 2009 at 10:38 AM, Jun Rao wrote: > > > > > > Johnathan, > > > > > > Could you explain a bit more how the pluggable partitioner (that > provides > > > String-> EndPoint mapping) works? > > > > > > In particular, > > > 1. How does the partitioner obtain the list of EndPoints in the system? > > > > Same way it does now, through Gossip. The main change is from > > > > private Map tokenToEndPointMap_ > > > > to > > > > private Map tokenToEndPointMap_ > > > > where Token can either be implemented as a wrapper around BigIntegeror > String. > > > > > 2. What happens when EndPoints are added/removed from the system? Does > the > > > partitioner have to remember the history of the EndPoints? > > > > Ditto. > > > > > 3. How does the partitioner coordinate with the load-balancer? Suppose > some > > > rows are moved from one EndPoint to another. How is that information > > > communicated and used by the partitioner so that routing remains > correct? > > > > Load balancing isn't complete yet; I didn't mean to imply otherwise. > > So I don't know for sure. Avinash has probably thought about this > > more. But having Token be abstract shouldn't affect the algorithm. > > > > -Jonathan > --0016e64beb54b9b5a70466b5564b--