Return-Path: Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: (qmail 45416 invoked from network); 5 Mar 2011 23:26:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Mar 2011 23:26:10 -0000 Received: (qmail 77080 invoked by uid 500); 5 Mar 2011 23:26:10 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 77051 invoked by uid 500); 5 Mar 2011 23:26:10 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 77042 invoked by uid 99); 5 Mar 2011 23:26:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Mar 2011 23:26:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Mar 2011 23:26:07 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C977A578DC for ; Sat, 5 Mar 2011 23:25:45 +0000 (UTC) Date: Sat, 5 Mar 2011 23:25:45 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: <2023381198.1302.1299367545822.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1338034528.5767.1299006697462.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (HBASE-3586) Improve the selection of regions to balance MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-3586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003065#comment-13003065 ] Ted Yu commented on HBASE-3586: ------------------------------- Although balanceCluster() can be made more complex by considering both old and new regions, the new patch achieves the same effect. When creating a table with multiple regions, I check whether there're online region servers which don't carry region (this can be relaxed by introducing a threshold which separates overloaded and underloaded servers). If there're such servers, balance() is called to balance the (relatively old) regions. Since assignmentManager.assignUserRegions() uses round-robin assignment, cluster would still be balanced when createTable() returns. > Improve the selection of regions to balance > ------------------------------------------- > > Key: HBASE-3586 > URL: https://issues.apache.org/jira/browse/HBASE-3586 > Project: HBase > Issue Type: Improvement > Affects Versions: 0.90.1 > Reporter: Jean-Daniel Cryans > Assignee: Ted Yu > Priority: Critical > Fix For: 0.90.2 > > Attachments: HBASE-3586-by-region-age.patch, HBASE-3586-by-region-age.patch, hbase-3586-table-creation.txt, hbase-3586-with-sort.txt > > > Currently LoadBalancer goes through the list of regions per RS and grabs the few first ones to balance. This is not bad, but that list is often sorted naturally since the a RS that boots will open the regions in a sequential and sorted order (since it comes from .META.) which means that we're balancing regions starting in an almost sorted fashion. > We discovered that because one of our internal users created a new table starting with letter "p" which has now grown to 100 regions in the last few hours and they are all served by 1 region server. Looking at the master's log, the balancer has moved as many regions from that region server but they are all from the same table that starts with letter "a" (and the regions that were moved all come one after the other). > The part of the code that should be modified is: > {code} > for (HRegionInfo hri: regions) { > // Don't rebalance meta regions. > if (hri.isMetaRegion()) continue; > regionsToMove.add(new RegionPlan(hri, serverInfo, null)); > numTaken++; > if (numTaken >= numToOffload) break; > } > {code} -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira