[
https://issues.apache.org/jira/browse/HBASE-2531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873332#action_12873332
]
HBase Review Board commented on HBASE-2531:
-------------------------------------------
Message from: [email protected]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.hbase.org/r/104/#review100
-----------------------------------------------------------
It looks great to me. Only objection is '/' as delimiter in new format. Would
prefer something doesn't require escaping when searching in tools such as vim.
How about a '.'? I'm going to try it out now. Will report back.
trunk/bin/add_table.rb
<http://review.hbase.org/r/104/#comment585>
I'm sorry you had to edit this file Kannan
trunk/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
<http://review.hbase.org/r/104/#comment586>
Are you tied to '/'? Could we use '.' instead? I'm in vi and having to
search for instances of a regionname. I'll have to escape the / before I begin
my search? If it was a '.' or '-' I wouldn't have to?
trunk/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
<http://review.hbase.org/r/104/#comment587>
This will come out funny in javadoc I think. You might have to change the
'<' into < for them to show properly.
trunk/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
<http://review.hbase.org/r/104/#comment588>
Nice. It'll be easy to change then.
trunk/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
<http://review.hbase.org/r/104/#comment589>
Nitpick: This could be written as:
return (regionName.length >= 1) && (regionName[regionName.length - 1] ==
ENC_SEPARATOR);
trunk/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
<http://review.hbase.org/r/104/#comment591>
good
trunk/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
<http://review.hbase.org/r/104/#comment592>
Whats happening here? Why not just return the cached String? Does it not
include the new encoded suffix?
trunk/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java
<http://review.hbase.org/r/104/#comment593>
What changed on this line (and the one before). Just watching out for you.
Any changes in hfile cause Ryan to perk up and come looksee.
trunk/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java
<http://review.hbase.org/r/104/#comment594>
Be careful. Looks only one real change in this file (though the diff
reports many more than that)
trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
<http://review.hbase.org/r/104/#comment595>
This is great - getting rid of having to tag on the encoding
trunk/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
<http://review.hbase.org/r/104/#comment596>
What changed on this line?
trunk/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
<http://review.hbase.org/r/104/#comment597>
What changed on these lines?
trunk/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
<http://review.hbase.org/r/104/#comment598>
Yeah, what changed here?
trunk/src/main/java/org/apache/hadoop/hbase/util/MD5Hash.java
<http://review.hbase.org/r/104/#comment599>
Throw a RuntimeException I'd say.
trunk/src/main/resources/hbase-webapps/master/table.jsp
<http://review.hbase.org/r/104/#comment600>
This is good
- stack
> 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.