Return-Path: Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: (qmail 56805 invoked from network); 20 Nov 2009 02:33:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Nov 2009 02:33:03 -0000 Received: (qmail 6233 invoked by uid 500); 20 Nov 2009 02:33:03 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 6168 invoked by uid 500); 20 Nov 2009 02:33:03 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 6153 invoked by uid 99); 20 Nov 2009 02:33:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2009 02:33:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2009 02:33:00 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B4929234C1EF for ; Thu, 19 Nov 2009 18:32:39 -0800 (PST) Message-ID: <1764944612.1258684359738.JavaMail.jira@brutus> Date: Fri, 20 Nov 2009 02:32:39 +0000 (UTC) From: "Suresh Srinivas (JIRA)" To: hdfs-issues@hadoop.apache.org Subject: [jira] Commented: (HDFS-778) DistributedFileSystem.getFileBlockLocations() may occasionally return numeric ips as hostnames. In-Reply-To: <1829225698.1258640199647.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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.