[ 
https://issues.apache.org/jira/browse/HBASE-4616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168708#comment-13168708
 ] 

Alex Newman commented on HBASE-4616:
------------------------------------

I am copying some comments from Stack to this review.

=====
src/main/java/org/apache/hadoop/hbase/HRegionInfo.java (Diff revision 1)
private void setHashCode() {
350 int allocation = tableName ==  null ? 2 : tableName.length + 2;
347 byte[] uuidTableName = 
UUID.nameUUIDFromBytes(tableName).toString().getBytes();
This should do Bytes.toBytes() and pass the String version (else you are 
susceptible to the machines' locale -- toBytes does UTF-8 all the time).
=======
Is that true, since I am getting the string/bytes from a uuid the chars should 
be very restricted. Are you talking about what I pass to be uuided?

=======
src/main/java/org/apache/hadoop/hbase/HRegionInfo.java (Diff revision 1)
private void setHashCode() {
393 // Use the region name thus far (namely, <tablename(1|2)>,<endKey>,<id>)
391 // Use the region name thus far (namely, <UUID 
tablename(1|2)>,<endKey>,<id>)
Not sure I grok this change.
=======

In an upcoming patch I clarified the javadoc

=======
src/main/java/org/apache/hadoop/hbase/HRegionInfo.java (Diff revision 1)
private void setHashCode() {
399 if (startKey == null || startKey.length < 1) {
Is this change related to this patch?
=======
I moved it around

=======
src/main/java/org/apache/hadoop/hbase/HRegionInfo.java (Diff revision 1)
private void setHashCode() {
419 public static byte [] getTableName(byte[] regionName) {
422 public static byte [] getTableNameUUID(byte[] regionName) {
Should change the javadoc?  Can we not get the table name any more once this 
change goes in?  Get the table name from HRI I mean?  We'd have to do look up 
into a Map of UUID to tablename?
=========

You can still get it from the hri, just not from a static context given just 
the regionname.
                
> Update hregion encoded name to reduce logic and prevent region collisions in 
> META
> ---------------------------------------------------------------------------------
>
>                 Key: HBASE-4616
>                 URL: https://issues.apache.org/jira/browse/HBASE-4616
>             Project: HBase
>          Issue Type: Umbrella
>            Reporter: Alex Newman
>            Assignee: Alex Newman
>         Attachments: HBASE-4616.patch
>
>


--
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

        

Reply via email to