Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB29B10F4F for ; Fri, 28 Jun 2013 03:40:31 +0000 (UTC) Received: (qmail 48089 invoked by uid 500); 28 Jun 2013 03:40:30 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 46340 invoked by uid 500); 28 Jun 2013 03:40:24 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 46298 invoked by uid 99); 28 Jun 2013 03:40:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jun 2013 03:40:22 +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: domain of ramkrishna.s.vasudevan@gmail.com designates 209.85.216.175 as permitted sender) Received: from [209.85.216.175] (HELO mail-qc0-f175.google.com) (209.85.216.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jun 2013 03:40:18 +0000 Received: by mail-qc0-f175.google.com with SMTP id k14so1056686qcv.20 for ; Thu, 27 Jun 2013 20:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FWpEou7WzmGuTvMOUx2DZ6RYEZiRU/ErJdzdGdgGaAw=; b=h4qN9iv/DE+Y/koiRomlXtBTHjhwqmMNqJ1WHH3nlxwRMAmayySj0gUlSfVwB2QQBO VnZZd8Zl+ZqvgjeTN2Kw+7NaiYYrO4tZ3UwrMN+hkehOLOWOOdvZrWyiCNjaYoxHDnwu l90UyKGfNKAzMX9awphgnl9aVd9t+BfJrJ2QQ2HKmNL6lYv6oqvNUb69+QE6cBpXEGqL OkLWzZnutBnw7gYDkfnxOtbCXxj6VLB4pncuf7G1vJMn53OtsWfcRCV1uy83HoPUyrdZ X2NjRU6xcbRlt1hcJkJAin5zqsSnuZUJYiZsllbnLEimYz6WxFhA+Sskvva/VDDdp+qX jKaQ== MIME-Version: 1.0 X-Received: by 10.49.29.106 with SMTP id j10mr14793149qeh.37.1372390797400; Thu, 27 Jun 2013 20:39:57 -0700 (PDT) Received: by 10.49.116.143 with HTTP; Thu, 27 Jun 2013 20:39:57 -0700 (PDT) In-Reply-To: References: Date: Fri, 28 Jun 2013 09:09:57 +0530 Message-ID: Subject: Re: Adding a new region server or splitting an old region in a Hash-partitioned HBase Data Store From: ramkrishna vasudevan To: dev@hbase.apache.org Cc: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=047d7bdca478f8e45a04e02ea1f8 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bdca478f8e45a04e02ea1f8 Content-Type: text/plain; charset=ISO-8859-1 I would suggest you could write a custom load balancer and then have your hashing algo to determine how the load balancing should happen. Hope this helps. Regards Ram On Fri, Jun 28, 2013 at 5:32 AM, Joarder KAMAL wrote: > Thanks St.Ack for mentioning about the load-balancer. > > But my question was two folded: > Case-1. If a new RS is added, then the load-balancer will do it's job > considering no new region has been created in the meanwhile. // As you've > already answered. > > Case-2. Whether a new RS is added or not, an existing region is splitted > into two, then how the new writes will to the new region? Because, lets say > initially the hash function was calculated with *N* Regions and now there > are *N+1* Regions in the cluster. > > In that case, do I need to change the Hash function and reshuffle all the > existing data within the cluster !! Or, HBase has some mechanism to handle > this? > > > Many thanks again for helping me out... > > > > Regards, > Joarder Kamal > > On 28 June 2013 02:26, Stack wrote: > > > On Wed, Jun 26, 2013 at 4:24 PM, Joarder KAMAL > wrote: > > > > > May be a simple question to answer for the experienced HBase users and > > > developers: > > > > > > If I use hash partitioning to evenly distribute write workloads into my > > > region servers and later add a new region server to scale or split an > > > existing region, then do I need to change my hash function and > re-shuffle > > > all the existing data in between all the region servers (old and new)? > > Or, > > > is there any better solution for this? Any guidance would be very much > > > helpful. > > > > > > > You do not need to change your hash function. > > > > When you add a new regionserver, the balancer will move some of the > > existing regions to the new host. > > > > St.Ack > > > --047d7bdca478f8e45a04e02ea1f8--