Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 67559 invoked from network); 27 Jul 2007 17:32:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Jul 2007 17:32:30 -0000 Received: (qmail 10660 invoked by uid 500); 27 Jul 2007 17:32:30 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 10416 invoked by uid 500); 27 Jul 2007 17:32:29 -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 10407 invoked by uid 99); 27 Jul 2007 17:32:29 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2007 10:32:29 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [207.126.228.149] (HELO rsmtp1.corp.yahoo.com) (207.126.228.149) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2007 17:32:18 +0000 Received: from coatspeaklx (wlanvpn-mc2e-247-13.corp.yahoo.com [172.21.149.13]) (authenticated bits=0) by rsmtp1.corp.yahoo.com (8.13.8/8.13.6/y.rout) with ESMTP id l6RHVjjg054540 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 27 Jul 2007 10:31:45 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=from:to:references:subject:date:message-id:mime-version: content-type:content-transfer-encoding:x-mailer:x-mimeole:thread-index:in-reply-to; b=EsOsRoHY6C3tQDaDxkxqlZEUy0fvRHxbNSTSWwYDu+DhVCudBiWL4PDSitwSrdrR From: "Dhruba Borthakur" To: References: <31188434.1185492183793.JavaMail.jira@brutus> <46AA0365.3050009@gmail.com> Subject: RE: [jira] Commented: (HADOOP-1647) DistributedFileSystem.getFileStatus() fails for path "/" Date: Fri, 27 Jul 2007 10:31:44 -0700 Message-ID: <006701c7d074$00d8a410$639115ac@ds.corp.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Thread-Index: AcfQW+ZvmyGWZ3BATzGNAFXGR5+uXAAF+L5w In-Reply-To: <46AA0365.3050009@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Enis, I guess the reason your patch fails is because the name returned for all inodes (except the root) will have two "/" in the beginning, e.g. //user/dhruba. Thanks, dhruba -----Original Message----- From: Enis Soztutar [mailto:enis.soz.nutch@gmail.com] Sent: Friday, July 27, 2007 7:38 AM To: hadoop-dev@lucene.apache.org Subject: Re: [jira] Commented: (HADOOP-1647) DistributedFileSystem.getFileStatus() fails for path "/" Dhruba, your version fixes the problem and passes the unit tests, However I also wonder why my version does not pass the tests. Maybe there are some assumptions that are wrong. I think we may benefit by examining the cause. My patch fails in org.apache.hadoop.dfs.TestCheckpoint org.apache.hadoop.dfs.TestDFSFinalize org.apache.hadoop.dfs.TestDFSShell org.apache.hadoop.dfs.TestFsck org.apache.hadoop.dfs.TestRestartDFS org.apache.hadoop.fs.TestCopyFiles org.apache.hadoop.mapred.TestMiniMRClasspath org.apache.hadoop.mapred.TestMiniMRDFSCaching org.apache.hadoop.mapred.TestMiniMRWithDFS quite an success for a line liner *smile*. Anyhow i will not be around for a while so i cannot pursue this further. Other than that +1 for Dhruba's patch to be applied both 0.14 and 0.15. Raghu Angadi (JIRA) wrote: > [ https://issues.apache.org/jira/browse/HADOOP-1647?page=com.atlassian.jira.pl ugin.system.issuetabpanels:comment-tabpanel#action_12515905 ] > > Raghu Angadi commented on HADOOP-1647: > -------------------------------------- > > I am curious how Enis' patch above is functionally different? Is there any case where rootDir has non null parent? > > >> DistributedFileSystem.getFileStatus() fails for path "/" >> -------------------------------------------------------- >> >> Key: HADOOP-1647 >> URL: https://issues.apache.org/jira/browse/HADOOP-1647 >> Project: Hadoop >> Issue Type: Bug >> Components: dfs >> Affects Versions: 0.14.0, 0.15.0 >> Reporter: Enis Soztutar >> Assignee: dhruba borthakur >> Priority: Blocker >> Fix For: 0.14.0, 0.15.0 >> >> Attachments: fileStatus.patch, getFileStatusJavadoc.patch >> >> >> DistributedFileSystem#getFileStatus throws the following exception when invoked with new Path("/"). LocalFileSystem does not. The code to produce this error is >> {code} >> public static void main(String[] args) throws Exception{ >> Configuration conf = new Configuration(); >> FileSystem fs = FileSystem.get(conf); >> Path path = new Path("/"); >> System.out.println("Path : \"" + path.toString() + "\""); >> System.out.println(fs.isDirectory(path)); >> System.out.println(fs.getFileStatus(path).isDir()); >> } >> {code} >> for Local configuration the code prints : >> {code} >> Path : "/" >> true >> true >> {code} >> For a new formatted dfs with only one file /user/enis/file.txt, Path could not be created. >> {code} >> Path : "/" >> false >> Exception in thread "main" org.apache.hadoop.ipc.RemoteException: java.io.IOException: java.lang.IllegalArgumentException: Can not create a Path from an empty string >> at org.apache.hadoop.fs.Path.checkPathArg(Path.java:82) >> at org.apache.hadoop.fs.Path.(Path.java:90) >> at org.apache.hadoop.dfs.DFSFileInfo.(DFSFileInfo.java:59) >> at org.apache.hadoop.dfs.FSDirectory.getFileInfo(FSDirectory.java:729) >> at org.apache.hadoop.dfs.FSNamesystem.getFileInfo(FSNamesystem.java:1301) >> at org.apache.hadoop.dfs.NameNode.getFileInfo(NameNode.java:488) >> at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) >> at java.lang.reflect.Method.invoke(Method.java:585) >> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:340) >> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:566) >> at org.apache.hadoop.ipc.Client.call(Client.java:470) >> at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:165) >> at org.apache.hadoop.dfs.$Proxy0.getFileInfo(Unknown Source) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) >> at java.lang.reflect.Method.invoke(Method.java:585) >> at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocati onHandler.java:82) >> at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHand ler.java:59) >> at org.apache.hadoop.dfs.$Proxy0.getFileInfo(Unknown Source) >> at org.apache.hadoop.dfs.DFSClient.getFileInfo(DFSClient.java:430) >> at org.apache.hadoop.dfs.DistributedFileSystem.getFileStatus(DistributedFileSys tem.java:319) >> at org.apache.hadoop.util.TestIsDir.main(TestIsDir.java:38) >> {code} >> > >