You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by Diaa Abdallah <di...@gmail.com> on 2014/05/13 00:08:42 UTC
Clean up in case of error is not handled
Hi,
I noticed that nutch doesn't handle cleaning up (removing temp folders) in
case of error.
In the following classes temp directories are created but not removed when
there is an error:
1. Injector
2. CrawlDBReader
3. Deduplication
4. SegmentReader
For example in injector you find:
RunningJob mapJob = JobClient.runJob(sortJob);
which is not encapsulated in a try catch block like such:
try
{
RunningJob mapJob = JobClient.runJob(sortJob);
}catch(IOException e)
{
fs.delete(tempDir,true);
throw e;
}
Should I create a Jira ticket with patches for this?
Regards,
Diaa