Cleanup DatanodeInfo vs DatanodeID handling in DN servlets
----------------------------------------------------------
Key: HDFS-3232
URL: https://issues.apache.org/jira/browse/HDFS-3232
Project: Hadoop HDFS
Issue Type: Improvement
Reporter: Eli Collins
Assignee: Eli Collins
Priority: Minor
The DN servlets currently have code like the following:
{code}
final String hostname = host instanceof DatanodeInfo
? ((DatanodeInfo)host).getHostName() : host.getIpAddr();
{code}
I believe this outdated, that we now always get one or the other (at least when
not running the tests). Need to verify that. We should clean this code up as
well, eg always use the IP (which we'll lookup the FQDN for) since the hostname
isn't necessarily valid to put in a URL (the DN hostname isn't necesarily a
FQDN).
--
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