Return-Path: Delivered-To: apmail-hbase-user-archive@www.apache.org Received: (qmail 7020 invoked from network); 7 Sep 2010 03:54:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Sep 2010 03:54:13 -0000 Received: (qmail 54483 invoked by uid 500); 7 Sep 2010 03:54:12 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 54337 invoked by uid 500); 7 Sep 2010 03:54:10 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 54329 invoked by uid 99); 7 Sep 2010 03:54:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Sep 2010 03:54:09 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of saint.ack@gmail.com designates 74.125.82.51 as permitted sender) Received: from [74.125.82.51] (HELO mail-ww0-f51.google.com) (74.125.82.51) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Sep 2010 03:54:03 +0000 Received: by wwi18 with SMTP id 18so2752357wwi.20 for ; Mon, 06 Sep 2010 20:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=7UbkiSRi4p1HCGL07nIkx3tZ0xjd/7jS6sxdBKEk8N8=; b=qsFIIE8Y6Qx3FT6BPhraeXfhDnH+IvOZ19c8lUxJNK3ymLxk2EfCHusxWC3O8NuPmU Ql65vSDXEywB/SLSdC+Kn2oYYuYopC1lyQt4GGH56bnBXDNYnVTl1Uep4ruN6DdJmmGD FgWYJbGyqoeDONU2DEVHV19msavR9GYwaKNyw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=Liqk+3JBGUNl+FV2hd5vpSViwowinUV0okh0LexJbjFroRFdj3u/o7CYLthFC6Ud4U dc2VpbRJ+957F0GurfM6iURL4xPTmd6ZFFC6jWzTcEH7+pQgzaZrRJ05R/dB5ahzrMOD C4bh9UAfxXpDQLtbz44jug+X8Z8HBaVuxX8q4= MIME-Version: 1.0 Received: by 10.216.236.197 with SMTP id w47mr2544436weq.114.1283831621853; Mon, 06 Sep 2010 20:53:41 -0700 (PDT) Sender: saint.ack@gmail.com Received: by 10.216.131.24 with HTTP; Mon, 6 Sep 2010 20:53:41 -0700 (PDT) In-Reply-To: References: Date: Mon, 6 Sep 2010 20:53:41 -0700 X-Google-Sender-Auth: 2_OLlPlUOJc3Fi1YORDmgDwhKRs Message-ID: Subject: Re: question about RegionManager From: Stack To: user@hbase.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Well spotted! This issue was fixed in 0.20.5. It was "HBASE-2167 Load balancer falls into pathological state if one server under average - slop; endless churn" St.Ack On Mon, Sep 6, 2010 at 7:06 PM, Tao Xie wrote: > hi, all > > I'm reading the code of RegionManager, I find in the following method the= re > is an situation when nRegionsToAssign <=3D nregions, the code only assign= s 1 > region. > Is this correct? Hbase version 0.20.4. > > =A0private void assignRegionsToMultipleServers(final HServerLoad > thisServersLoad, > =A0 =A0final Set regionsToAssign, final HServerInfo info, > =A0 =A0final ArrayList returnMsgs) { > =A0 =A0boolean isMetaAssign =3D false; > =A0 =A0for (RegionState s : regionsToAssign) { > =A0 =A0 =A0if (s.getRegionInfo().isMetaRegion()) > =A0 =A0 =A0 =A0isMetaAssign =3D true; > =A0 =A0} > =A0 =A0int nRegionsToAssign =3D regionsToAssign.size(); > =A0 =A0// Now many regions to assign this server. > =A0 =A0int nregions =3D regionsPerServer(nRegionsToAssign, thisServersLoa= d); > =A0 =A0LOG.debug("Assigning for " + info + ": total nregions to assign=3D= " + > =A0 =A0 =A0nRegionsToAssign + ", nregions to reach balance=3D" + nregions= + > =A0 =A0 =A0", isMetaAssign=3D" + isMetaAssign); > =A0 =A0if (nRegionsToAssign <=3D nregions) { > =A0 =A0 =A0// I do not know whats supposed to happen in this case. =A0Ass= ign one. > =A0 =A0 =A0LOG.debug("Assigning one region only (playing it safe..)"); > =A0 =A0 =A0assignRegions(regionsToAssign, 1, info, returnMsgs); > =A0 =A0} else { >