Return-Path: Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: (qmail 84379 invoked from network); 11 Aug 2009 21:20:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Aug 2009 21:20:31 -0000 Received: (qmail 7325 invoked by uid 500); 11 Aug 2009 21:20:38 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 7243 invoked by uid 500); 11 Aug 2009 21:20:38 -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 6983 invoked by uid 99); 11 Aug 2009 21:20:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Aug 2009 21:20:37 +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; Tue, 11 Aug 2009 21:20:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4E2D9234C004 for ; Tue, 11 Aug 2009 14:20:15 -0700 (PDT) Message-ID: <943521106.1250025615305.JavaMail.jira@brutus> Date: Tue, 11 Aug 2009 14:20:15 -0700 (PDT) From: "Todd Lipcon (JIRA)" To: hdfs-issues@hadoop.apache.org Subject: [jira] Commented: (HDFS-513) NameNode.getBlockLocations throws NPE when offset > filesize and file is not empty In-Reply-To: <118786470.1248911714812.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-513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742062#action_12742062 ] Todd Lipcon commented on HDFS-513: ---------------------------------- failed tests are the same missing-avro that are several builds old in trunk > NameNode.getBlockLocations throws NPE when offset > filesize and file is not empty > ---------------------------------------------------------------------------------- > > Key: HDFS-513 > URL: https://issues.apache.org/jira/browse/HDFS-513 > Project: Hadoop HDFS > Issue Type: Bug > Components: name-node > Reporter: Todd Lipcon > Attachments: hdfs-513-trunk.txt, hdfs-513.txt > > > in BlockManager.getBlockLocations, if the offset is past the end of a non-empty file, it returns null. In FSNamesystem.getBlockLocationsInternal, this null is passed through to inode.createLocatedBlocks, so it ends up with a LocatedBlocks instance whose .blocks is null. This is then iterated over in FSNamesystem.getBlockLocations, and throws an NPE. > Instead, I think BlockManager.getBlockLocations should return Collections.emptyList in the past-EOF case. This would result in an empty list response from NN.getBlockLocations which matches the behavior of an empty file. If this sounds like the appropriate fix I"ll attach the patch. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.