That's about where I got stuck as well. I didn't have time to look into this
problem any further then. I think it's best to either check the trunk and
see how it is solved there or just to move to 0.8 altogether.

Rgrds, Thomas


On 3/14/06, Laurent Michenaud <[EMAIL PROTECTED]> wrote:
>
> Here where i am :
>
> *** In the NutchBean
>
> I have made the segments and localFileSystem
> Variables as instance variables.
>
> private FetchedSegments segments ;
> private LocalFileSystem localFileSystem ;
>
> In the init method :
> localFileSystem = new LocalFileSystem();
> segments = new FetchedSegments(localFileSystem,segmentsDir.toString());
>
> And i've created the method closeSegment :
>
> public void closeSegments() throws IOException {
>        segments.closeSegments();
>        localFileSystem.close();
> }
>
> ** In the class FetchSegments
>
> I have added the method :
> public void closeSegments() throws IOException {
> Iterator iterSegments = segments.values().iterator();
> while( iterSegments.hasNext()) {
>          Segment oSegment = (Segment) iterSegments.next();
>          oSegment.close();
>        }
> }
>
> ** In the subclass FetchSegments.Segment
>
> I have added the method :
> public void close() throws IOException {
>        if ( fetcher != null )
>                fetcher.close();
>        if ( content != null )
>                content.close();
>        if ( text != null )
>                text.close();
>        if ( parsedata != null )
>                parsedata.close();
> }
>
>
>
>
> My test program :
> I instanciate the NutchBean.
> I make a search.
> I call oNutchBean.closeSegments()
> Finally, I try to delete the index dir and i get :
>
> java.io.IOException: Unable to delete file:
> D:\Projets\application-data\recherche\indexations\indexes-
> 20060314-17h33.54\segments\20060314173333\parse_text\data
>        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:951)
>        at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java
> :713)
>        at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java
> :680)
>        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:943)
>        at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java
> :713)
>        at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java
> :680)
>        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:943)
>        at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java
> :713)
>        at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java
> :680)
>        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:943)
>        at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java
> :713)
>        at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java
> :680)
>
> So, it is not ok yet.
>
>
>
>
> -----Message d'origine-----
> De : TDLN [mailto:[EMAIL PROTECTED]
> Envoyé : mardi 14 mars 2006 12:39
> À : [email protected]
> Objet : Re: Problems
>
> I think so too, maybe as part of the upcoming 0.7.2 release.
>
> In the meantime, you can try to implement the fix suggested in this post
>
> http://www.mail-archive.com/[email protected]/msg03011.html
>
> If it works, for you, please let me know, I need the fix as well :)
>
> Rgrds, Thomas
>
>
>
> On 3/14/06, Laurent Michenaud <[EMAIL PROTECTED]> wrote:
> >
> > It would be interesting to have a fix for 0.7
> >
> > -----Message d'origine-----
> > De : TDLN [mailto:[EMAIL PROTECTED] Envoyé : mardi 14 mars 2006
> > 12:32 À : [email protected] Objet : Re: Problems
> >
> > Unfortunately, in the 0.7 release, the NutchBean does not clean up
> > properly after itself, so some SegementReaders and IndexReaders remain
> open.
> > I think this is fixed in the current code line. I had similar problems
> > in my app based on 0.7 - all that helped was killing the processes
> > blocking the index.
> >
> > Rgrds, Thomas
> >
> >
> > On 3/13/06, Laurent Michenaud <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > I have integrated nutch in my application.
> > >
> > > In the admin part, i can launch the indexation.
> > > In the client part, i can launch searches.
> > >
> > > After a search,  i can't do an indexation again because the index
> > > files are used by the NutchBean.
> > >
> > > How can i do that please ?
> > >
> > > thx
> > >
> > >
> >
>

Reply via email to