Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
None
-
None
-
Reviewed
-
Changes format of region name. Adds an md5 suffix. Suffix is now the name used as directory name in filesystem.
Description
Kannan tripped over two regionnames that hashed the same:
Here is code demo'ing that his two names hash the same:
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)); } }
Need new encoding mechanism. Will need to migrate old regions to new schema.
Attachments
Attachments
Issue Links
- relates to
-
HBASE-2600 Change how we do meta tables; from tablename+STARTROW+randomid to instead, tablename+ENDROW+randomid
- Closed