You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Daryn Sharp (JIRA)" <ji...@apache.org> on 2015/03/04 18:01:05 UTC
[jira] [Updated] (HDFS-7434) DatanodeID hashCode should not be
mutable
[ https://issues.apache.org/jira/browse/HDFS-7434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daryn Sharp updated HDFS-7434:
------------------------------
Attachment: HDFS-7434.patch
UUID becomes immutable and the hashCode of DatanodeIds. Updated the few tests that relied on mutating the uuid to create new instances instead. This actually makes the tests more accurate because real registrations are not using the exact same object reference. DatanodeIds are now safe for collections.
> DatanodeID hashCode should not be mutable
> -----------------------------------------
>
> Key: HDFS-7434
> URL: https://issues.apache.org/jira/browse/HDFS-7434
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: namenode
> Affects Versions: 2.0.0-alpha, 3.0.0
> Reporter: Daryn Sharp
> Attachments: HDFS-7434.patch
>
>
> Mutable hash codes may lead to orphaned instances in a collection. Instances must always be removed prior to modification of hash code values, and re-inserted. Although current code appears to do this, the mutable hash code is a landmine.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)