Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 41146 invoked from network); 8 Apr 2008 17:20:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Apr 2008 17:20:12 -0000 Received: (qmail 25895 invoked by uid 500); 8 Apr 2008 17:20:10 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 25862 invoked by uid 500); 8 Apr 2008 17:20:10 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 25852 invoked by uid 99); 8 Apr 2008 17:20:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Apr 2008 10:20:10 -0700 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, 08 Apr 2008 17:19:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 19C96234C0C6 for ; Tue, 8 Apr 2008 10:17:25 -0700 (PDT) Message-ID: <1044905889.1207675045104.JavaMail.jira@brutus> Date: Tue, 8 Apr 2008 10:17:25 -0700 (PDT) From: "Tsz Wo (Nicholas), SZE (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-3203) TaskTracker::localizeJob doesn't provide the correct size to LocalDirAllocator In-Reply-To: <1812972854.1207615285383.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586894#action_12586894 ] Tsz Wo (Nicholas), SZE commented on HADOOP-3203: ------------------------------------------------ In this case, you should use FileSystem.getFileStatus(Path) instead of FileSystem.listStatus(Path). > TaskTracker::localizeJob doesn't provide the correct size to LocalDirAllocator > ------------------------------------------------------------------------------ > > Key: HADOOP-3203 > URL: https://issues.apache.org/jira/browse/HADOOP-3203 > Project: Hadoop Core > Issue Type: Bug > Affects Versions: 0.15.3 > Reporter: Chris Douglas > Assignee: Amareshwari Sriramadasu > Fix For: 0.18.0 > > Attachments: patch-3203.txt > > > In TaskTracker::localizeJob: > {code} > // Get sizes of JobFile and JarFile > // sizes are -1 if they are not present. > FileSystem fileSystem = FileSystem.get(fConf); > FileStatus status[] = fileSystem.listStatus(new Path(jobFile).getParent()); > long jarFileSize = -1; > long jobFileSize = -1; > for(FileStatus stat : status) { > if (stat.getPath().toString().contains("job.xml")) { > jobFileSize = stat.getLen(); > } else { > jobFileSize = -1; > } > if (stat.getPath().toString().contains("job.jar")) { > jarFileSize = stat.getLen(); > } else { > jarFileSize = -1; > } > } > {code} > One or both of jobFileSize and jarFileSize will be -1. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.