I am looking into that now.. But.. This thread lives past the running of
my code.. If it was a normal thread, ie not a daemon then.. It should
die when the parent, (me) dies.. .. Now I don't use daemon threads much
but.. My understanding is that they are configured this way by a setting
a flag.. They have to have a flag set to true for them to become a
daemon. I have to look this up but.. That is what I understood.. So..
Wouldn't there be a flag maybe somewhere in the configs that we could
set instead of me bashing around in the Nutch code.. I am just asking..
I am thinking that I should hunt around for that , or.. Maybe someone
already knows where that lives.. Maybe??

-----Original Message-----
From: Andrzej Bialecki [mailto:[email protected]] 
Sent: Thursday, April 23, 2009 5:32 PM
To: [email protected]
Subject: Re: Using nutchBean

Lukas, Ray wrote:
> I started going through the source code debugging this problem.. The
> extra thread comes from FetchedSegments(Configuration conf, Path
> segmentsDir) constructor. This constructor creates a segmentUpdater
and
> then starts it.. This is the thread that I am talking about.. 
> 
> Does anyone know how to cleanly shut down this segment updater?

Looking at the code it's not possible right now. You need to modify the 
FetchedSegment.close() to include also the shutdown of this thread. 
Since the thread already loops in a while (true) loop, it's enough to 
change this to a boolean flag and set this flag to false in the close() 
method.

If you come up with a more or less clean patch please submit this to 
JIRA as an improvement.

-- 
Best regards,
Andrzej Bialecki     <><
  ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com

Reply via email to