Return-Path: Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: (qmail 98234 invoked from network); 23 Feb 2010 21:49:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2010 21:49:51 -0000 Received: (qmail 14979 invoked by uid 500); 23 Feb 2010 21:49:50 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 14907 invoked by uid 500); 23 Feb 2010 21:49:50 -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 14884 invoked by uid 99); 23 Feb 2010 21:49:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2010 21:49:50 +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, 23 Feb 2010 21:49:49 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 13C0A29A0018 for ; Tue, 23 Feb 2010 13:49:28 -0800 (PST) Message-ID: <1038620569.472991266961768079.JavaMail.jira@brutus.apache.org> Date: Tue, 23 Feb 2010 21:49:28 +0000 (UTC) From: "Hairong Kuang (JIRA)" To: hdfs-issues@hadoop.apache.org Subject: [jira] Updated: (HDFS-946) NameNode should not return full path name when lisitng a diretory or getting the status of a file In-Reply-To: <2145634073.12491265229687974.JavaMail.jira@brutus.apache.org> 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-946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hairong Kuang updated HDFS-946: ------------------------------- Attachment: HdfsFileStatusProxy-Yahoo20.patch This patch additionally has the change to hdfsproxy in Yahoo!'s security branch. > NameNode should not return full path name when lisitng a diretory or getting the status of a file > ------------------------------------------------------------------------------------------------- > > Key: HDFS-946 > URL: https://issues.apache.org/jira/browse/HDFS-946 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Hairong Kuang > Assignee: Hairong Kuang > Fix For: 0.22.0 > > Attachments: HdfsFileStatus-yahoo20.patch, HDFSFileStatus.patch, HDFSFileStatus1.patch, HdfsFileStatus3.patch, HdfsFileStatus4.patch, HdfsFileStatusProxy-Yahoo20.patch > > > FSDirectory#getListring(String src) has the following code: > int i = 0; > for (INode cur : contents) { > listing[i] = createFileStatus(srcs+cur.getLocalName(), cur); > i++; > } > So listing a directory will return an array of FileStatus. Each FileStatus element has the full path name. This increases the return message size and adds non-negligible CPU time to the operation. > FSDirectory#getFileInfo(String) does not need to return the file name either. > Another optimization is that in the version of FileStatus that's used in the wire protocol, the field path does not need to be Path; It could be a String or a byte array ideally. This could avoid unnecessary creation of the Path objects at NameNode, thus help reduce the GC problem observed when a large number of getFileInfo or getListing operations hit NameNode. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.