[
https://issues.apache.org/jira/browse/HDFS-5208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13769605#comment-13769605
]
Colin Patrick McCabe commented on HDFS-5208:
--------------------------------------------
If you look in DatanodeID, a base class of DatanodeRegistration, you'll find
this:
{code}
private String ipAddr; // IP address
private String hostName; // hostname claimed by datanode
private String peerHostName; // hostname from the actual connection
{code}
{{ipAddr}} is the IP address as a string. {{hostName}} is the "registration
name." {{peerHostName}} is the hostname.
The registration name can't be resolved by DNS. In fact, it is completely
fake. But will be added to {{DNSToSwitchMapping}} if a datanode asks for it to
be added.
So really you need to clear all of them, plus all of them including a colon and
port.
> Only clear network location cache on specific nodes if invalid
> NetworkTopology happens
> --------------------------------------------------------------------------------------
>
> Key: HDFS-5208
> URL: https://issues.apache.org/jira/browse/HDFS-5208
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Junping Du
> Assignee: Junping Du
> Attachments: HDFS-5208-v1.patch
>
>
> After HDFS-4521, once a DN is registered with invalid networktopology, all
> cached rack info in DNSToSwitchMapping will be cleared. We should only clear
> cache on specific nodes.
--
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