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 "Suresh Srinivas (JIRA)" <ji...@apache.org> on 2009/11/20 03:32:39 UTC
[jira] Commented: (HDFS-778)
DistributedFileSystem.getFileBlockLocations() may occasionally return
numeric ips as hostnames.
[ https://issues.apache.org/jira/browse/HDFS-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780386#action_12780386 ]
Suresh Srinivas commented on HDFS-778:
--------------------------------------
Looks like datanodes are registering with IP address as the name in registration instead of host name. I in suspect o.a.h.net.DNS, {{InetAddress.getLocalHost().getCanonicalHostName()}} is returning the IP address. Not sure if this is due to some java SecurityManager issue.
> DistributedFileSystem.getFileBlockLocations() may occasionally return numeric ips as hostnames.
> -----------------------------------------------------------------------------------------------
>
> Key: HDFS-778
> URL: https://issues.apache.org/jira/browse/HDFS-778
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Hong Tang
>
> DistributedFileSystem.getFileBlockLocations() may occasionally return numeric ips as hostnames. This seems to be a breach of the FileSystem.getFileBlockLocation() contract:
> {noformat}
> /**
> * Return an array containing hostnames, offset and size of
> * portions of the given file. For a nonexistent
> * file or regions, null will be returned.
> *
> * This call is most helpful with DFS, where it returns
> * hostnames of machines that contain the given file.
> *
> * The FileSystem will simply return an elt containing 'localhost'.
> */
> public BlockLocation[] getFileBlockLocations(FileStatus file,
> long start, long len) throws IOException
> {noformat}
> One (maybe minor) consequence of this issue is: When a job includes such numeric ips in in its splits' locations, JobTracker would not be able to assign the job's map tasks local to the file blocks.
> We should either fix the implementation or change the contract. In the latter case, JobTracker needs to be fixed to maintain both the hostnames and ips of the TaskTrackers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.