Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
-
None
-
CentOS 5.2, JDK 1.6
Description
In FSNamesystem.java registerDatanode(), if the datanode address cannot be
got from the RPC Server, it will use that from the datanode report:
String dnAddress = Server.getRemoteAddress();
if (dnAddress == null)
The getHost() may return the hostname or address, while the Server.getRemoteAddress()
will return the IP address, which is the dnAddress should be. Thus I think the it should be
if (dnAddress == null)
{ // Mostly called inside an RPC. // But if not, use address passed by the data-node. dnAddress = InetAddress.getByName(nodeReg.getHost()).getHostAddress(); }
I know it should not be called in most situation, but I indeed use that, and I suppose the
dnAddress should be an IP address.