The code below caused some ParseText to be opened fo 10 times. When the
segments is added and deleted dynamic, the file handles only be closed once.
It subdue the stability.
net.nutch.searcher.FetchedSegments.java:73
//-----------------------------------------------------------------------
if (text == null) {
this.text = new ArrayFile.Reader
(nfs, new File(segmentDir, ParseText.DIR_NAME).toString());
}
//-----------------------------------------------------------------------
new code is listed here:
//-----------------------------------------------------------------------
synchronized(this){
if (text == null) {
this.text = new ArrayFile.Reader
(nfs, new File(segmentDir, ParseText.DIR_NAME).toString());
}
}
//-----------------------------------------------------------------------
Any comment?
Cheers,
Alan