Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 199A19D54 for ; Thu, 15 Mar 2012 00:39:01 +0000 (UTC) Received: (qmail 77062 invoked by uid 500); 15 Mar 2012 00:39:00 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 77032 invoked by uid 500); 15 Mar 2012 00:39:00 -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 77023 invoked by uid 99); 15 Mar 2012 00:39:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 00:39:00 +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; Thu, 15 Mar 2012 00:38:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D66A620209 for ; Thu, 15 Mar 2012 00:38:39 +0000 (UTC) Date: Thu, 15 Mar 2012 00:38:39 +0000 (UTC) From: "Jonathan Hsieh (Commented) (JIRA)" To: issues@hbase.apache.org Message-ID: <1115882508.16905.1331771919894.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1831738415.1155.1331530602397.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-5563) HRegionInfo#compareTo add the comparison of regionId 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-5563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229801#comment-13229801 ] Jonathan Hsieh commented on HBASE-5563: --------------------------------------- A bunch of the failures have been fixed with this addition, but there are a still a few remaining to hunt down. {code} diff --git a/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java index 479861d..cad4314 100644 --- a/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java +++ b/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java @@ -2705,8 +2705,10 @@ public class AssignmentManager extends ZooKeeperListener */ public List getRegionsOfTable(byte[] tableName) { List tableRegions = new ArrayList(); + // boundary needs to have table's name but regionID 0 so that it is sorted + // before all table's regions. HRegionInfo boundary = - new HRegionInfo(tableName, null, null); + new HRegionInfo(tableName, null, null, false, 0L); synchronized (this.regions) { for (HRegionInfo regionInfo: this.regions.tailMap(boundary).keySet()) { if(Bytes.equals(regionInfo.getTableName(), tableName)) { {code} > HRegionInfo#compareTo add the comparison of regionId > ---------------------------------------------------- > > Key: HBASE-5563 > URL: https://issues.apache.org/jira/browse/HBASE-5563 > Project: HBase > Issue Type: Bug > Reporter: chunhui shen > Assignee: chunhui shen > Attachments: HBASE-5563.patch, HBASE-5563v2.patch, HBASE-5563v2.patch > > > In the one region multi assigned case, we could find that two regions have the same table name, same startKey, same endKey, and different regionId, so these two regions are same in TreeMap but different in HashMap. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira