lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Created: (LUCENE-704) Lucene should have a "write once" mode
Date Thu, 02 Nov 2006 18:37:16 GMT
Lucene should have a "write once" mode

                 Key: LUCENE-704
             Project: Lucene - Java
          Issue Type: Improvement
          Components: Index
    Affects Versions: 2.1
            Reporter: Michael McCandless
         Assigned To: Michael McCandless
            Priority: Minor

This is a spinoff of LUCENE-701

If your directory is residing on a "write once" filesystem (eg Hadoop), we need for Lucene
to have a mode where it doesn't write to the same file more than once, nor (I think?) do things
like rewind a file to overwrite parts of it.

Lockless commits (LUCENE-701 ) gets us closer to this goal because it always commits to a
new segments_N+1 file (and new files for deletes/separate norms), but, it still re-writes
to a "segments.gen" file.  This file is often "optional" (it's only necessary if directory
listing can be stale on the platform/filesystem).

The only other place I know of is in CompoundFileWriter.close().  That method writes 0's into
the header and then rewinds and rewrites those 0s with the actual offsets into the compound
file.  I think (on quick inspection) that pre-computing the offsets and writing everything
in one pass should be simple.

Does anyone know of other places that re-use filenames or rewind/seek and rewrite bytes?

We should create a "setWriteOnceMode()" or something like that.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message