Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 10927 invoked from network); 8 Jul 2010 13:05:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Jul 2010 13:05:50 -0000 Received: (qmail 95991 invoked by uid 500); 8 Jul 2010 13:05:48 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 95814 invoked by uid 500); 8 Jul 2010 13:05:45 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 95805 invoked by uid 99); 8 Jul 2010 13:05:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jul 2010 13:05:44 +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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jul 2010 13:05:41 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o68Cvot3018602 for ; Thu, 8 Jul 2010 12:57:50 GMT Message-ID: <10201114.259291278593870144.JavaMail.jira@thor> Date: Thu, 8 Jul 2010 08:57:50 -0400 (EDT) From: "Andrzej Bialecki (JIRA)" To: dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-2373) Create a Codec to work with streaming and append-only filesystems 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/LUCENE-2373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrzej Bialecki updated LUCENE-2373: -------------------------------------- Attachment: LUCENE-2372-2.patch Updated patch. I added comments both in top-level CHANGES and in contrib/CHANGES, to account for two new areas of functionality - the customizable SegmentInfosWriter and the appending codec. If there are no objections I'd like to commit it. > Create a Codec to work with streaming and append-only filesystems > ----------------------------------------------------------------- > > Key: LUCENE-2373 > URL: https://issues.apache.org/jira/browse/LUCENE-2373 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Reporter: Andrzej Bialecki > Fix For: 4.0 > > Attachments: appending.patch, appending.patch, LUCENE-2372-2.patch, LUCENE-2373.patch > > > Since early 2.x times Lucene used a skip/seek/write trick to patch the length of the terms dict into a place near the start of the output data file. This however made it impossible to use Lucene with append-only filesystems such as HDFS. > In the post-flex trunk the following code in StandardTermsDictWriter initiates this: > {code} > // Count indexed fields up front > CodecUtil.writeHeader(out, CODEC_NAME, VERSION_CURRENT); > out.writeLong(0); // leave space for end index pointer > {code} > and completes this in close(): > {code} > out.seek(CodecUtil.headerLength(CODEC_NAME)); > out.writeLong(dirStart); > {code} > I propose to change this layout so that this pointer is stored simply at the end of the file. It's always 8 bytes long, and we known the final length of the file from Directory, so it's a single additional seek(length - 8) to read it, which is not much considering the benefits. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org