[jira] Created: (LUCENE-704) Lucene should have a "write once" mode

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (LUCENE-704) Lucene should have a "write once" mode

JIRA jira@apache.org
Lucene should have a "write once" mode
--------------------------------------

                 Key: LUCENE-704
                 URL: http://issues.apache.org/jira/browse/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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-704) Lucene should have a "write once" mode

JIRA jira@apache.org
    [ http://issues.apache.org/jira/browse/LUCENE-704?page=comments#action_12446698 ]
           
Yonik Seeley commented on LUCENE-704:
-------------------------------------

Found it: http://issues.apache.org/jira/browse/LUCENE-532
Looks like TermInfosWriter is the culprit.

Personally, I think having to use the non-compound index format for write-once mode would be fine.
Indexing w/ compound file format in HDFS would lead to much worse performance anyway.

> Lucene should have a "write once" mode
> --------------------------------------
>
>                 Key: LUCENE-704
>                 URL: http://issues.apache.org/jira/browse/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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (LUCENE-704) Lucene should have a "write once" mode

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org
     [ http://issues.apache.org/jira/browse/LUCENE-704?page=all ]

Michael McCandless resolved LUCENE-704.
---------------------------------------

    Resolution: Duplicate

I think this is a dup of LUCENE-532

> Lucene should have a "write once" mode
> --------------------------------------
>
>                 Key: LUCENE-704
>                 URL: http://issues.apache.org/jira/browse/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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]