[
https://issues.apache.org/jira/browse/LUCENE-4848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13608041#comment-13608041
]
Michael Poindexter commented on LUCENE-4848:
--------------------------------------------
bq. AsyncFSDirectory does not need an async output. In Lucene we are fine to
use RandomAccessFile to write as this is never done from several thraeds.
Writing an index is always a sequential operation, theoretically an
OutputStream would be enough (but we still have to seek sometimes, so this is
not completely true). So a channel based FSIndexOutput is not needed, we can
stick with the one that already exists. And because of this I removed the split.
Fair enough. I was trying to preserve the ability for AsyncFSOutput to write
to a Path in the future (and for Path based access there is not necessarily a
File on disk to open a RAF from...it could be a zip filesystem for example).
Unfortunately you can't just extend BufferedIndexOutput if you wanted to do
this. There's a hook in the close() method of FSIndexOutput that calls
parent.onIndexOutputClosed(this). onIndexOutputClosed only accepts a
FSIndexOutput, not a BufferedIndexOutput.
It really doesn't matter I guess, but I think to allow for extenders the
subclassable FSIndexOutut would be nice.
> Fix Directory implementations to use NIO2 APIs
> ----------------------------------------------
>
> Key: LUCENE-4848
> URL: https://issues.apache.org/jira/browse/LUCENE-4848
> Project: Lucene - Core
> Issue Type: Task
> Affects Versions: 5.0
> Reporter: Michael Poindexter
> Assignee: Uwe Schindler
> Priority: Minor
> Fix For: 5.0
>
> Attachments: jdk7directory.zip, LUCENE-4848-MMapDirectory.patch,
> LUCENE-4848.patch, LUCENE-4848.patch, LUCENE-4848.patch, LUCENE-4848.patch,
> LUCENE-4848.patch, LUCENE-4848.patch, LUCENE-4848.patch, LUCENE-4848.patch.txt
>
>
> I have implemented 3 Directory subclasses using NIO2 API's (available on
> JDK7). These may be suitable for inclusion in a Lucene contrib module.
> See the mailing list at http://lucene.markmail.org/thread/lrv7miivzmjm3ml5
> for more details about this code and the advantages it provides.
> The code is attached as a zip to this issue. I'll be happy to make any
> changes requested. I've included some minimal smoke tests, but any help in
> how to use the normal Lucene tests to perform more thorough testing would be
> appreciated.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]