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
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nutch-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-developers