You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Dhruv <dh...@gmail.com> on 2012/05/30 00:39:42 UTC
Directory, IndexInput and IndexOutput concurrency
I am trying to implement an in-memory version of the Directory, IndexInput
and IndexOutput classes, similar to RAMDirectory.
Can someone please point out if there are any concurrency and thread safety
requirements from these classes? Do the users of these classes implement
client side locking or use thread confinement? Are there any other OS level
file system guarantees which the Lucene's Directory implementations make
use of and which I should ensure from my in-memory implementation?
I am using Lucene 3.0.3 and I have looked at RAMDirectory's and
RAMIndexInputStream and RAMIndexOutputStream code but it does not
explicitly mention any concurrency requirements.
Any help in this regard will be appreciated.
Thank you,
-Dhruv
Re: Directory, IndexInput and IndexOutput concurrency
Posted by Uwe Schindler <uw...@thetaphi.de>.
In addition, IndexInput.clone must create abother view on the same file, useable from another thread.
--
Uwe Schindler
H.-H.-Meier-Allee 63, 28213 Bremen
http://www.thetaphi.de
Michael McCandless <lu...@mikemccandless.com> schrieb:
Multiple threads are free to interact with Directory.
But it will be only one thread at a time interacting with a single
instance of IndexInput and IndexOutput.
Mike McCandless
http://blog.mikemccandless.com
On Tue, May 29, 2012 at 6:39 PM, Dhruv <dh...@gmail.com> wrote:
> I am trying to implement an in-memory version of the Directory, IndexInput
> and IndexOutput classes, similar to RAMDirectory.
>
> Can someone please point out if there are any concurrency and thread safety
> requirements from these classes? Do the users of these classes implement
> client side locking or use thread confinement? Are there any other OS level
> file system guarantees which the Lucene's Directory implementations make
> use of and which I should ensure from my in-memory implementation?
>
> I am using Lucene 3.0.3 and I have looked at RAMDirectory's and
> RAMIndexInputStream and RAMIndexOutputStream code but it does not
> explicitly mention any concurrency requirements.
>
> Any help in this regard will be appreciated.
>
> Thank you,
> -Dhruv
_____________________________________________
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Directory, IndexInput and IndexOutput concurrency
Posted by Dhruv <dh...@gmail.com>.
Thank you Mike. This could be documented in Lucene's Directory and stream
classes for others benefit too.
On Tue, May 29, 2012 at 3:54 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:
> Multiple threads are free to interact with Directory.
>
> But it will be only one thread at a time interacting with a single
> instance of IndexInput and IndexOutput.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Tue, May 29, 2012 at 6:39 PM, Dhruv <dh...@gmail.com> wrote:
> > I am trying to implement an in-memory version of the Directory,
> IndexInput
> > and IndexOutput classes, similar to RAMDirectory.
> >
> > Can someone please point out if there are any concurrency and thread
> safety
> > requirements from these classes? Do the users of these classes implement
> > client side locking or use thread confinement? Are there any other OS
> level
> > file system guarantees which the Lucene's Directory implementations make
> > use of and which I should ensure from my in-memory implementation?
> >
> > I am using Lucene 3.0.3 and I have looked at RAMDirectory's and
> > RAMIndexInputStream and RAMIndexOutputStream code but it does not
> > explicitly mention any concurrency requirements.
> >
> > Any help in this regard will be appreciated.
> >
> > Thank you,
> > -Dhruv
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
Re: Directory, IndexInput and IndexOutput concurrency
Posted by Michael McCandless <lu...@mikemccandless.com>.
Multiple threads are free to interact with Directory.
But it will be only one thread at a time interacting with a single
instance of IndexInput and IndexOutput.
Mike McCandless
http://blog.mikemccandless.com
On Tue, May 29, 2012 at 6:39 PM, Dhruv <dh...@gmail.com> wrote:
> I am trying to implement an in-memory version of the Directory, IndexInput
> and IndexOutput classes, similar to RAMDirectory.
>
> Can someone please point out if there are any concurrency and thread safety
> requirements from these classes? Do the users of these classes implement
> client side locking or use thread confinement? Are there any other OS level
> file system guarantees which the Lucene's Directory implementations make
> use of and which I should ensure from my in-memory implementation?
>
> I am using Lucene 3.0.3 and I have looked at RAMDirectory's and
> RAMIndexInputStream and RAMIndexOutputStream code but it does not
> explicitly mention any concurrency requirements.
>
> Any help in this regard will be appreciated.
>
> Thank you,
> -Dhruv
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org