Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 98692 invoked from network); 24 May 2006 21:01:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 May 2006 21:01:44 -0000 Received: (qmail 1006 invoked by uid 500); 24 May 2006 21:01:44 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 984 invoked by uid 500); 24 May 2006 21:01:44 -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 975 invoked by uid 99); 24 May 2006 21:01:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 May 2006 14:01:44 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [74.0.0.77] (HELO linuxfly.dragonflymc.com) (74.0.0.77) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 May 2006 14:01:43 -0700 Received: from [192.168.1.246] (unknown [63.133.162.98]) by linuxfly.dragonflymc.com (Postfix) with ESMTP id 7B4FDC2006C for ; Wed, 24 May 2006 16:02:13 -0500 (CDT) Message-ID: <4474C9A4.2060201@dragonflymc.com> Date: Wed, 24 May 2006 16:01:24 -0500 From: Dennis Kubes User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: hadoop-dev@lucene.apache.org Subject: Re: unprotectedRenameTo and Non-Existent Parent Directory References: <4474C69C.8010807@dragonflymc.com> <4474C8DC.2030301@yahoo-inc.com> In-Reply-To: <4474C8DC.2030301@yahoo-inc.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N That is where I was headed as well. I was thinking of adding something like fs.mkdirs(newLinkDb); in the install method. I will submit a patch. Dennis Konstantin Shvachko wrote: > This is a standard behavior of "mv". Don't think we should change it. > I think it is better to call mkdirs before renaming. > > --Konst > > Dennis Kubes wrote: > >> Currently calls to unprotectedRenameTo in FSDirectory will not create >> parent directories of the rename path. Should this behavior be >> changed to create the parent directories if they do not exist? >> >> This is effecting the LinkDB install method. For example if I am >> creating a linkdb by the name of crawl/linkdb the install method >> calls a rename from working directory (something like linkdb-1234...) >> to crawl/linkdb/current. But if the crawl/linkdb directory does not >> already exist then the rename fails. >> >> Dennis >> >> >> >