Re: ContentStreamUpdateRequest addFile fails to close Stream

2010-02-04 Thread Christoph Brill
Good job Mark, works fine and does not keep my files open. Thanks, Chris Am 03.02.2010 15:24, schrieb Mark Miller: > Hey Christoph, > > Could you give the patch at > https://issues.apache.org/jira/browse/SOLR-1744 a try and let me know > how it works out for you?

Re: ContentStreamUpdateRequest addFile fails to close Stream

2010-02-03 Thread Mark Miller
Hey Christoph, Could you give the patch at https://issues.apache.org/jira/browse/SOLR-1744 a try and let me know how it works out for you? -- - Mark http://www.lucidimagination.com Mark Miller wrote: > Christoph Brill wrote: > >> I tried to fix it in CommonsHttpSolrServer but I wasn't s

Re: ContentStreamUpdateRequest addFile fails to close Stream

2010-02-02 Thread Mark Miller
Christoph Brill wrote: > I tried to fix it in CommonsHttpSolrServer but I wasn't sure how to do > it. I tried to close the stream after the method got executed, but > somehow getContent() always returned null (see attached patch against > solr 1.4 for my non-working attempt). > > Who's responsible

Re: ContentStreamUpdateRequest addFile fails to close Stream

2010-02-02 Thread Christoph Brill
I tried to fix it in CommonsHttpSolrServer but I wasn't sure how to do it. I tried to close the stream after the method got executed, but somehow getContent() always returned null (see attached patch against solr 1.4 for my non-working attempt). Who's responsible for closing a stream? CommonsHttpS

Re: ContentStreamUpdateRequest addFile fails to close Stream

2010-02-02 Thread Mark Miller
Broken by design? How about we just fix BinaryUpdateRequestHandler (and possibly CommonsHttpSolrServer) to close the stream it gets? Christoph Brill wrote: > I worked around it using my own FileStream class. Its basically the same > as the original one, except it does not create a new FileInputSt

Re: ContentStreamUpdateRequest addFile fails to close Stream

2010-02-02 Thread Christoph Brill
I worked around it using my own FileStream class. Its basically the same as the original one, except it does not create a new FileInputStream in getStream (which IMO is broken by design as noone ever closes this stream). public class FileStream extends ContentStreamBase { private final java.io.F

ContentStreamUpdateRequest addFile fails to close Stream

2010-02-02 Thread Christoph Brill
Hi list, I'm using ContentStreamUpdateRequest.addFile(File) to index a bunch of documents. This works fine unless the stream created in addFile doesn't seem to get closed. This causes issues because my process has to many open files. It's a bug, right? Regards, Chris