[ 
https://issues.apache.org/jira/browse/HDFS-5381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colin Patrick McCabe updated HDFS-5381:
---------------------------------------

    Description: {{ExtendedBlock#hashCode}} contains both a block pool ID and a 
block ID.  The {{equals}} function checks both.  However, {{hashCode}} only 
uses block ID.  Since HDFS-4645, block IDs are now allocated sequentially.  
This means that there will be a lot of hash collisions when federation is in 
use.  We should use both block ID and block pool ID in {{hashCode}} to prevent 
this.  (was: {{ExtendedBlock#hashCode}} contains both a block pool ID and a 
block ID.  The {{equals}} function checks both.  However, {{hashCode}} only 
uses block ID.  Since HDFS-4645, block pool IDs are now allocated sequentially. 
 This means that there will be a lot of hash collisions when federation is in 
use.  We should use both block ID and block pool ID in {{hashCode}} to prevent 
this.)

> ExtendedBlock#hashCode should use both blockId and block pool ID
> ----------------------------------------------------------------
>
>                 Key: HDFS-5381
>                 URL: https://issues.apache.org/jira/browse/HDFS-5381
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode, namenode
>    Affects Versions: 2.3.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>            Priority: Minor
>
> {{ExtendedBlock#hashCode}} contains both a block pool ID and a block ID.  The 
> {{equals}} function checks both.  However, {{hashCode}} only uses block ID.  
> Since HDFS-4645, block IDs are now allocated sequentially.  This means that 
> there will be a lot of hash collisions when federation is in use.  We should 
> use both block ID and block pool ID in {{hashCode}} to prevent this.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to