You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Alex Newman (Commented) (JIRA)" <ji...@apache.org> on 2011/10/13 23:09:12 UTC

[jira] [Commented] (HBASE-4382) Region encoded name is hash of tablename + start key + regionid (timestamp); should include end key when hashing.

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

Alex Newman commented on HBASE-4382:
------------------------------------

Looks done to me 

 HRegionIinfo.java:
private void setHashCode() {
    int result = Arrays.hashCode(this.regionName);
    result ^= this.regionId;
    result ^= Arrays.hashCode(this.startKey);
    result ^= Arrays.hashCode(this.endKey);
    result ^= Boolean.valueOf(this.offLine).hashCode();
    result ^= Arrays.hashCode(this.tableName);
    this.hashCode = result;
  }
                
> Region encoded name is hash of tablename + start key + regionid (timestamp); should include end key when hashing.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4382
>                 URL: https://issues.apache.org/jira/browse/HBASE-4382
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: stack
>              Labels: noob
>
> Seems odd that region encoded name is same for regions if made in same second with same start key tough their end keys are different.  It can happen in unit test.  Should mix in the end key when coming up w/ the region name encoded name.

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