Return-Path: Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: (qmail 92978 invoked from network); 30 May 2010 00:12:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 May 2010 00:12:06 -0000 Received: (qmail 49256 invoked by uid 500); 30 May 2010 00:12:06 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 49214 invoked by uid 500); 30 May 2010 00:12:06 -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 49206 invoked by uid 500); 30 May 2010 00:12:06 -0000 Delivered-To: apmail-hadoop-hbase-issues@hadoop.apache.org Received: (qmail 49203 invoked by uid 99); 30 May 2010 00:12:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 May 2010 00:12:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 May 2010 00:12:03 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4U0BgFk021286 for ; Sun, 30 May 2010 00:11:42 GMT Message-ID: <8301597.68321275178302028.JavaMail.jira@thor> Date: Sat, 29 May 2010 20:11:42 -0400 (EDT) From: "HBase Review Board (JIRA)" To: hbase-issues@hadoop.apache.org Subject: [jira] Commented: (HBASE-2531) 32-bit encoding of regionnames waaaaaaayyyyy too susceptible to hash clashes 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-2531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873347#action_12873347 ] HBase Review Board commented on HBASE-2531: ------------------------------------------- Message from: "Kannan Muthukkaruppan" ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://review.hbase.org/r/104/#review102 ----------------------------------------------------------- trunk/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java will do. trunk/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java old style region names don't have their encoded name in the regionNameStr. So I check for that here, and append the encoded name for those regions so that the logs, web UI, etc. will display the encoded named for those regions. trunk/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java will get rid of all whitespace diffs. trunk/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java Will get rid of all the whitespace diffs. After the big whitespace cleanup landed in 0.20, I decided to set my eclipse to kill trailing whitespaces. But looks like trunk still has a bunch of whitespaces. trunk/src/main/java/org/apache/hadoop/hbase/util/MD5Hash.java ok... - Kannan > 32-bit encoding of regionnames waaaaaaayyyyy too susceptible to hash clashes > ---------------------------------------------------------------------------- > > Key: HBASE-2531 > URL: https://issues.apache.org/jira/browse/HBASE-2531 > Project: HBase > Issue Type: Bug > Reporter: stack > Assignee: Kannan Muthukkaruppan > Priority: Blocker > Fix For: 0.21.0 > > Attachments: HBASE-2531_v2.patch > > > Kannan tripped over two regionnames that hashed the same: > Here is code demo'ing that his two names hash the same: > {code} > package org; > import org.apache.hadoop.hbase.util.Bytes; > import org.apache.hadoop.hbase.util.JenkinsHash; > public class Testing { > public static void main(final String [] args) { > System.out.println(encodeRegionName(Bytes.toBytes("test1,6838000000,1273541236167"))); > System.out.println(encodeRegionName(Bytes.toBytes("test1,0520100000,1273541610201"))); > } > /** > * @param regionName > * @return the encodedName > */ > public static int encodeRegionName(final byte [] regionName) { > return Math.abs(JenkinsHash.getInstance().hash(regionName, regionName.length, 0)); > } > } > {code} > Need new encoding mechanism. Will need to migrate old regions to new schema. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.