[EMAIL PROTECTED] wrote:
I found the root cause. The culprit is at line
1663             FileUtil.fullyDelete(fs, oldDbFile);
in src/java/net/nutch/db/WebDBWriter.java
It can't delete and in fact returns false.

The real bug lurks in src/java/net/nutch/util/FileUtil.java, line
20         File contents[] = nfs.listFiles(dir);
which, in turn, manifests itself in
src/java/net/nutch/util/LocalFileSystem.java, line
265         NDFSFile[] nfiles = new NDFSFile[files.length];

Currenlty NDFSFile.java does not support severl methods, including delete().

Good catch! Actually, this error is a side-effect of my change to the LocalFileSystem - originally it was using just java.io.File in the lines above, but that clashed with the suggested usage in TestClient.java (you would get a ClassCastException).


I'm wondering if the fact that NDFSFile doesn't support these methods is a design-choice, or an omission, and whether it should be "fixed".

My suggested fix is attached below.
It also fixes ant test error. So build failure at sf.net should be gone too.

Your fix to FileUtil.java in reality moves the body of this method to LocalFileSystem.delete(...) - because that class contains a verbatim copy of this method for its private use.



If no objection, I will commit in 2 days.

No objections here.

--
Best regards,
Andrzej Bialecki

-------------------------------------------------
Software Architect, System Integration Specialist
CEN/ISSS EC Workshop, ECIMF project chair
EU FP6 E-Commerce Expert/Evaluator
-------------------------------------------------
FreeBSD developer (http://www.freebsd.org)



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nutch-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nutch-developers

Reply via email to