Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 8793 invoked from network); 19 Jun 2007 00:21:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2007 00:21:48 -0000 Received: (qmail 73340 invoked by uid 500); 19 Jun 2007 00:21:50 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 73314 invoked by uid 500); 19 Jun 2007 00:21:50 -0000 Mailing-List: contact hadoop-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-dev@lucene.apache.org Received: (qmail 73305 invoked by uid 99); 19 Jun 2007 00:21:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2007 17:21:50 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jun 2007 17:21:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0E35B7141AA for ; Mon, 18 Jun 2007 17:21:26 -0700 (PDT) Message-ID: <28007525.1182212486055.JavaMail.jira@brutus> Date: Mon, 18 Jun 2007 17:21:26 -0700 (PDT) From: "dhruba borthakur (JIRA)" To: hadoop-dev@lucene.apache.org Subject: [jira] Commented: (HADOOP-1453) exists() not necessary before DFS.open In-Reply-To: <21692994.1180740315573.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-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505982 ] dhruba borthakur commented on HADOOP-1453: ------------------------------------------ Both your patches are for DistributedFileSystem whereas your comment says that there are *two* places where a redundant exists() call is made: DistributedFileSystem and ChecksumFileSystem. Can you pl clarify? > exists() not necessary before DFS.open > -------------------------------------- > > Key: HADOOP-1453 > URL: https://issues.apache.org/jira/browse/HADOOP-1453 > Project: Hadoop > Issue Type: Bug > Components: dfs > Reporter: Raghu Angadi > Assignee: Raghu Angadi > Fix For: 0.14.0 > > Attachments: HADOOP-1453-01.patch, HADOOP-1453-02.patch > > > {code:title=DistributedFileSystem.java:131|borderStyle=solid} > public FSDataInputStream open(Path f, int bufferSize) throws IOException { > if (!exists(f)) { > throw new FileNotFoundException(f.toString()); > } > return new DFSClient.DFSDataInputStream(dfs.open(getPath(f)), bufferSize); > } > {code} > {{exists(f)}} adds extra namenode interaction that is not really required. Open is a critical DFS call. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.