[ https://issues.apache.org/jira/browse/HDFS-3224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472817#comment-13472817 ]
Suresh Srinivas commented on HDFS-3224: --------------------------------------- There are three elements in DN identity - Storage ID, host address and transfer port. When storage ID does not change and other two elements change, it is correctly handled by the namenode. When storage ID changes: # Old behavior: remove any DN with matching host address (no transfer address) ## In case of single DN on the same host, correct DN is removed ## In case of multiple DNs on the same host, {color:red}a random DN is removed{color} # Current behavior: remove any DN with matching host address + transfer address ## In case of single DN on the same host, {color:red} no DN is removed{color} ## In case of multiple DNs on the same host, {color:red}no DN is removed{color} # Behavior with this patch: remove any DN with matching host address + transfer address ## In case of single DN on the same host, correct DN is removed ## In case of multiple DNs on the same host, correct DN is removed When Storage ID changes with IP address and/or transfer address, we will end up having two entries. I do not think this can be avoided. I have seen cases in many setups where multiple DNs are being run on the same machine. Given this, I prefer the new behavior with this patch. > Bug in check for DN re-registration with different storage ID > ------------------------------------------------------------- > > Key: HDFS-3224 > URL: https://issues.apache.org/jira/browse/HDFS-3224 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Eli Collins > Assignee: Jason Lowe > Priority: Minor > Attachments: HDFS-3224.patch, HDFS-3224.patch, HDFS-3224.patch > > > DatanodeManager#registerDatanode checks the host to node map using an IP:port > key, however the map is keyed on IP, so this check will always fail. It's > performing the check to determine if a DN with the same IP and storage ID has > already registered, and if so to remove this DN from the map and indicate > that eg it's no longer hosting these blocks. This bug has been here forever. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira